Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(berkeley): add user command types #1656

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
929 changes: 929 additions & 0 deletions docs/user-commands.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions rust/src/block/precomputed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,15 @@ impl PrecomputedBlock {
.commands
.iter()
.cloned()
.map(|c| UserCommandWithStatus::V1(Box::new(c)))
.map(UserCommandWithStatus::V1)
.collect(),
Self::V2(v2) => v2
.staged_ledger_diff
.diff
.iter()
.flatten()
.flat_map(|d| d.commands.to_owned())
.map(UserCommandWithStatus::V2)
.map(UserCommandWithStatus::from)
.collect(),
}
}
Expand All @@ -283,7 +283,7 @@ impl PrecomputedBlock {
.commands
.iter()
.cloned()
.map(|c| UserCommandWithStatus::V1(Box::new(c)))
.map(UserCommandWithStatus::V1)
.collect()
}),
Self::V2(v2) => v2.staged_ledger_diff.diff[1]
Expand All @@ -292,7 +292,7 @@ impl PrecomputedBlock {
diff.commands
.iter()
.cloned()
.map(UserCommandWithStatus::V2)
.map(UserCommandWithStatus::from)
.collect()
}),
}
Expand Down
Loading