-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add misc tests #751
Add misc tests #751
Conversation
op::addi(0x10, RegId::ZERO, 8), | ||
op::addi(0x11, RegId::ZERO, 16), | ||
op::addi(0x12, RegId::ZERO, 32), | ||
op::addi(0x13, RegId::ZERO, 64), | ||
op::addi(0x14, RegId::ZERO, 128), |
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.
It would be nice to use some constant names for registers. It will connect them here with the values in suite
let consensus_params = ConsensusParameters::standard(); | ||
|
||
let tx = TransactionBuilder::script(script, vec![]) | ||
.script_gas_limit(gas_limit) | ||
.add_random_fee_input() | ||
.finalize() | ||
.into_checked(height, &consensus_params) | ||
.expect("failed to generate checked tx") | ||
.into_ready( | ||
gas_price, | ||
consensus_params.gas_costs(), | ||
consensus_params.fee_params(), | ||
) | ||
.unwrap(); |
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.
It seems we repeat this part several times, maybe makes sense to move it into a function
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.
Looks good to me, added small [nit]s
Merging this as-is, those nits will be addressed later when we'll expand the test helper context |
Improves test coverage by testing some code paths that were not previously take. Will not contain any externally visible changes, only adding more tests and cleaning up existing ones.
Before requesting review