-
Notifications
You must be signed in to change notification settings - Fork 53
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(config-manager): generate script config from genesis #552
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## develop #552 +/- ##
===========================================
+ Coverage 86.35% 86.62% +0.26%
===========================================
Files 114 115 +1
Lines 22928 23045 +117
Branches 2312 2330 +18
===========================================
+ Hits 19800 19962 +162
+ Misses 3086 3040 -46
- Partials 42 43 +1
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
CODE_HASH: utils.computeScriptHash( | ||
genesisBlock.transactions[SIGHASH_OUTPUT_LOC[0]].outputs[ | ||
SIGHASH_OUTPUT_LOC[1] | ||
].type! |
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.
The input parameter is genesisBlock: Block
, which is assuming user to pass in a genesis block here.
But we should handle a situation when user feeds a non-genesis block, here using genesisBlock.transactions.outputs[x].type!
it will throw error like: invalid script
.
It will be better to throw Not a genesis block, please check the input block number
like, then add a test case to cover that
Description
Resolve #510
Example
Type of change
Please delete options that are not relevant.