f33a88cfc1
If the block reward was too high, the verification failed flag was set, but the function continued. The code which was supposed to trap this flag and return failure failed to trap it, and, while the block was not added to the chain, the function would return success. The reason for avoiding returning when the block reward problem was detected was to be able to return any transactions to the pool if needed. This is now mooted by moving the transaction return code to a separate function, which is now called at all appropriate points, making the logic much simpler, and hopefully correct now. We also move the hard fork version check after the prev_id check, as block which does not go on the top of the chain might not have the expected version there, without being invalid just for this reason. Last, we trap the case where a block fails to be added due to using already spent key images, to set the verification failed flag. |
||
---|---|---|
.. | ||
account.cpp | ||
account.h | ||
account_boost_serialization.h | ||
blockchain.cpp | ||
blockchain.h | ||
blockchain_storage.cpp | ||
blockchain_storage.h | ||
blockchain_storage_boost_serialization.h | ||
checkpoints.cpp | ||
checkpoints.h | ||
checkpoints_create.cpp | ||
checkpoints_create.h | ||
CMakeLists.txt | ||
connection_context.h | ||
cryptonote_basic.h | ||
cryptonote_basic_impl.cpp | ||
cryptonote_basic_impl.h | ||
cryptonote_boost_serialization.h | ||
cryptonote_core.cpp | ||
cryptonote_core.h | ||
cryptonote_format_utils.cpp | ||
cryptonote_format_utils.h | ||
cryptonote_stat_info.h | ||
difficulty.cpp | ||
difficulty.h | ||
hardfork.cpp | ||
hardfork.h | ||
miner.cpp | ||
miner.h | ||
tx_extra.h | ||
tx_pool.cpp | ||
tx_pool.h | ||
verification_context.h |