aboutsummaryrefslogtreecommitdiff
path: root/src/script/script_error.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-09-16 00:30:05 +0200
committerPieter Wuille <[email protected]>2014-09-24 19:17:02 +0200
commit584a358997e52a87e8c5402269c7fb3784ed2065 (patch)
tree72cb1589072c23bded2737f1fdf9b9fb0c3e0680 /src/script/script_error.cpp
parentMerge pull request #4955 (diff)
downloaddiscoin-584a358997e52a87e8c5402269c7fb3784ed2065.tar.xz
discoin-584a358997e52a87e8c5402269c7fb3784ed2065.zip
Do merkle root and txid duplicates check simultaneously
Move the txid duplicates check into BuildMerkleTree, where it can be done much more efficiently (without needing to build a full txid set to detect duplicates). The previous version (using the std::set<uint256> to detect duplicates) was also slightly too weak. A block mined with actual duplicate transactions (which is invalid, due to the inputs of the duplicated transactions being seen as double spends) would trigger the duplicates logic, resulting in the block not being stored on disk, and rerequested. This change fixes that by only triggering in the case of duplicated transactions that can actually result in an identical merkle root.
Diffstat (limited to 'src/script/script_error.cpp')
0 files changed, 0 insertions, 0 deletions