-
Notifications
You must be signed in to change notification settings - Fork 37
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
test(starknet_consensus_orchestrator): return central object intead o… #4235
Conversation
b46c1af
to
78e2862
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @DvirYo-starkware)
crates/starknet_consensus_orchestrator/src/cende/central_objects_test.rs
line 550 at r2 (raw file):
} fn central_transaction_execution_info_with_reverted(
it is not always with reverted.
Code quote:
fn central_transaction_execution_info_with_reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Yael-Starkware)
crates/starknet_consensus_orchestrator/src/cende/central_objects_test.rs
line 550 at r2 (raw file):
Previously, Yael-Starkware (YaelD) wrote…
it is not always with reverted.
Plese write what you think is appropriate name for the function you comment about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @DvirYo-starkware)
crates/starknet_consensus_orchestrator/src/cende/central_objects_test.rs
line 493 at r2 (raw file):
// the entire object, we fill only one CallInfo with non-default values and the other CallInfos are // None. fn central_transaction_execution_info() -> TransactionExecutionInfo {
Suggestion:
fn transaction_execution_info() -> TransactionExecutionInfo {
crates/starknet_consensus_orchestrator/src/cende/central_objects_test.rs
line 504 at r2 (raw file):
balance_high: felt!(3_u8), }, )),
Suggestion:
revert_error: None,
crates/starknet_consensus_orchestrator/src/cende/central_objects_test.rs
line 563 at r2 (raw file):
transaction_execution_info.into() }
Suggestion:
fn central_transaction_execution_info_reverted(
) -> CentralTransactionExecutionInfo {
let mut transaction_execution_info = central_transaction_execution_info();
// The python side enforces that if the transaction is reverted, the execute_call_info is None.
// Since we are using the same json files for python tests, we apply these rules here as well.
transaction_execution_info.execute_call_info = None;
transaction_execution_info.revert_error = Some(RevertError::PostExecution(
FeeCheckError::InsufficientFeeTokenBalance {
fee: Fee(1),
balance_low: felt!(2_u8),
balance_high: felt!(3_u8),
},
));
transaction_execution_info.into()
}
fn central_transaction_execution_info(
) -> CentralTransactionExecutionInfo {
transaction_execution_info.into()
}
78e2862
to
8486fa5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @Yael-Starkware)
crates/starknet_consensus_orchestrator/src/cende/central_objects_test.rs
line 493 at r2 (raw file):
// the entire object, we fill only one CallInfo with non-default values and the other CallInfos are // None. fn central_transaction_execution_info() -> TransactionExecutionInfo {
Done.
crates/starknet_consensus_orchestrator/src/cende/central_objects_test.rs
line 504 at r2 (raw file):
balance_high: felt!(3_u8), }, )),
Done.
crates/starknet_consensus_orchestrator/src/cende/central_objects_test.rs
line 563 at r2 (raw file):
transaction_execution_info.into() }
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @DvirYo-starkware)
…f json values in utilities cende test