-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: add expiration
transaction policy
#1583
base: master
Are you sure you want to change the base?
Conversation
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.
Neat -- great tests!
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.
Left a remark about our general approach to testing.
PR looks good
e2e/tests/contracts.rs
Outdated
.calling_this_will_produce_a_block() | ||
.with_tx_policies(TxPolicies::default().with_maturity(maturity)) | ||
}; | ||
let wallet = launch_provider_and_get_wallet().await?; |
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.
Why move away from setup_program_test
?
e2e/tests/predicates.rs
Outdated
@@ -1000,6 +1000,7 @@ async fn tx_id_not_changed_after_adding_witnesses() -> Result<()> { | |||
tx.append_witness(witness2.into())?; | |||
let tx_id_after_witnesses = tx.id(chain_id); | |||
|
|||
provider.produce_blocks(20, None).await?; |
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.
Why the manual block generation?
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.
leftover from some debugging.
closes: #1577
Release notes
Added the
expiration
transaction policy. Now the user can limit until which block height the transaction is valid.Breaking Changes
expiration: Option<u64>
field toTxPolicies
structTransaction
trait methodmaturity
now returnsOption<u64>
Transaction
trait methodwith_maturity
is removed.Checklist