-
Notifications
You must be signed in to change notification settings - Fork 769
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
New freeze option to deactivate block, tx freeze / Fix block options passing #941
Conversation
…ck options passing bug
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
I was just working on some extra tests here to verify that these |
block: block/header: add option carry-over test tx: add option carry-over test
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.
Yes, this looks like a good solution to me! Tests are solid 💯
@@ -43,6 +43,17 @@ export interface BlockOptions { | |||
* difficulty takes precedence over a provided static `difficulty` value. | |||
*/ | |||
calcDifficultyFromHeader?: BlockHeader | |||
/** | |||
* A block object by default gets frozen along initialization. This gives you |
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.
* A block object by default gets frozen along initialization. This gives you | |
A block object by default gets frozen during initialization. This gives you |
Just a tiny idiomatic change here...
This comment block is really helpful...makes the rationale for freezing very clear.
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.
Will leave this out since I don't want to dismiss the approval, hope that's ok.
@@ -70,7 +70,7 @@ export class Block { | |||
uncleHeaders.push(BlockHeader.fromValuesArray(uncleHeaderData, opts)) | |||
} | |||
|
|||
return new Block(header, transactions, uncleHeaders) | |||
return new Block(header, transactions, uncleHeaders, opts) |
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.
👍
Fixes #940