-
Notifications
You must be signed in to change notification settings - Fork 485
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
Support instant sealing #170
Support instant sealing #170
Conversation
Looking good IMO @ermalkaleci Two more thoughts I'll share:
pub struct MockTimestampInherentDataProvider {
current_timestamp: u64,
} |
@JoshOrndorff I think unsafe is fine since this is going to be used only in testing mode. Anyway we can also do thread_local! {
static CURRENT_TIMESTAMP: RefCell<u64> = RefCell::new(0);
} and get rid-off unsafe |
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.
LGTM! Just a minor nit.
* support both manual and instant sealing * fix name * remove sealing.unwrap() * make MockTimestamp to start from 0 * update docs * use thread_local to avoid unsafe * remove expect
Add support instant sealing which is useful for testing contracts.
NOTE: Although I creating a MockProvider to make waffle works, I still have to add a little delay (0.1s) between transaction to make it work but it's better then 6s