diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-25 22:13:38 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-25 22:13:38 +0000 |
commit | f33a88cfc17177e3a079ee2226df9674dfa2d138 (patch) | |
tree | 29f622729d96ee5ede660e54e5452f7861c124cb /src/daemonizer | |
parent | blockchain: fix an off by one error in unlocked time check (diff) | |
download | monero-f33a88cfc17177e3a079ee2226df9674dfa2d138.tar.xz |
blockchain: fix a few block addition bugs
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.
Diffstat (limited to 'src/daemonizer')
0 files changed, 0 insertions, 0 deletions