Implement EBx indicator in coinbase message
Details
- Reviewers
deadalnix freetrader kyuupichan awemany - Group Reviewers
Restricted Project - Commits
- rSTAGING27d1b4736eb2: Implement EBx indicator in coinbase message
rABC27d1b4736eb2: Implement EBx indicator in coinbase message
src/test/test_bitcoin -t miner_tests
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- add-eb-to-coinbase
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 389 Build 389: arc lint + arc unit
Event Timeline
src/validation.cpp | ||
---|---|---|
541 | left over, will remove on the next iteration |
src/miner.cpp | ||
---|---|---|
108 | This is introducing extra global state. |
Don't overwrite COINBASE_FLAG
avoid to introduce a new global state, read EB every time we need it
remove a left over from validation.cpp
src/miner.cpp | ||
---|---|---|
81 ↗ | (On Diff #628) | Return the vector directly and move near to where it is called. Make it static. |
201 ↗ | (On Diff #628) | This change is not necessary. The merkle root is not computed anyway. You have to call IncrementExtraNonce . |
src/miner.h | ||
18 ↗ | (On Diff #628) | Declare in the cpp file. |
227 ↗ | (On Diff #628) | Remove. |
src/test/miner_tests.cpp | ||
207 ↗ | (On Diff #628) | The chain params are in the config. |
220 ↗ | (On Diff #628) | You don't need to copy the coinbase. |
225 ↗ | (On Diff #628) | Empty lines are free. |
src/test/test_bitcoin.cpp | ||
131 ↗ | (On Diff #628) | No GetConfig here. The whole point of creating a config object is to get rid of global state, not add more. |
change return type of getExcessiveBlockSizeSig
check for coinbase message only agter IncrementExtraNonce has been called
src/miner.cpp | ||
---|---|---|
201 ↗ | (On Diff #633) | parenthesis? |
81 ↗ | (On Diff #628) | done |
201 ↗ | (On Diff #628) | removed |
src/miner.h | ||
227 ↗ | (On Diff #633) | CXX test/test_test_bitcoin-miner_tests.o test/miner_tests.cpp: In member function ‘void miner_tests::CheckCoinbase_EB::test_method()’: |
src/test/miner_tests.cpp | ||
207 ↗ | (On Diff #628) | done |
220 ↗ | (On Diff #628) | done |
225 ↗ | (On Diff #628) | added |
src/miner.h | ||
---|---|---|
18 ↗ | (On Diff #633) | This is clearly not done :) |
src/test/miner_tests.cpp | ||
228 ↗ | (On Diff #633) | Here you should use the value you expect. If not you are just testing that calling getExcessiveBlockSizeSig gives you the same result twice, but not that the results makes any sense whatsoever. |
src/test/test_bitcoin.cpp | ||
120 ↗ | (On Diff #633) | This changes nothing. You are still pulling config from the global state. Pass it down. |
mv MAX_COINBASE_SCRIPTSIG_SIZE to miner.cpp
remove decaration of getExcessiveBlockSizeSig from miner.h
make getExcessiveBlockSizeSig static
Expand the coinbase message test
src/miner.cpp | ||
---|---|---|
36 ↗ | (On Diff #645) | static |