diff options
author | Alex Morcos <morcos@chaincode.com> | 2015-11-03 10:35:39 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2015-12-01 12:09:37 -0500 |
commit | 553cad94e29c33872b60d97b8574ed2773355f0b (patch) | |
tree | 0cf289e53969878180a50a36cb264e084b0179f6 /doc | |
parent | 5f122633020ce5d9f78c73394cda576a8657a3ac (diff) |
Rewrite CreateNewBlock
Use the score index on the mempool to only add sorted txs in order. Remove much of the validation while building the block, relying on mempool to be consistent and only contain txs that can be mined.
The mempool is assumed to be consistent as far as not containing txs which spend non-existent outputs or double spends, and scripts are valid. Finality of txs is still checked (except not coinbase maturity, assumed in mempool).
Still TestBlockValidity in case mempool consistency breaks and return error state if an invalid block was created.
Unit tests are modified to realize that invalid blocks can now be constructed if the mempool breaks its consistency assumptions and also updated to have the right fees, since the cached value is now used for block construction.
Conflicts:
src/miner.cpp
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions