You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to be able to set the block timestamp and the block number when using TransactionContextBuilder for notes that have time based logic.
The logic of setting the timestamp and block number is the in the seal_block function:
I think setting the block number makes sense, but is there any real use case in terms of transaction or note scripts related to timestamps?
Having the timestamp available inside the kernel would be useful, but it isn't absolutely necessary. You could create some "timelock" account and compute the time until unlock by knowing the Miden blocktime * number_of_blocks.
Setting the block number in the TransactionContextBuilder would be useful.
Feature description
It would be useful to be able to set the block timestamp and the block number when using TransactionContextBuilder for notes that have time based logic.
The logic of setting the timestamp and block number is the in the
seal_block
function:miden-base/miden-tx/src/testing/tx_context.rs
Line 586 in ae174ee
Why is this feature needed?
Testing of notes with time based logic.
The text was updated successfully, but these errors were encountered: