aboutsummaryrefslogtreecommitdiff
path: root/src/coins.h
diff options
context:
space:
mode:
authorAlex Morcos <[email protected]>2015-11-12 16:57:03 -0500
committerAlex Morcos <[email protected]>2015-11-18 12:16:40 -0500
commit8504867b146014c99c6acb180020a1369069c761 (patch)
treeeb651ea7ab069c76e1252d8617c260250f5edc5d /src/coins.h
parentAlter assumptions in CCoinsViewCache::BatchWrite (diff)
downloaddiscoin-8504867b146014c99c6acb180020a1369069c761.tar.xz
discoin-8504867b146014c99c6acb180020a1369069c761.zip
Save the last unnecessary database read
It's possible coins with the same hash exist when you create a duplicate coinbase, so previously we were reading from the database to make sure we had the old coins cached so if we were to spend the new ones, the old ones would also be spent. This pull instead just marks the new coins as not fresh if they are from a coinbase, so if they are spent they will be written all the way down to the database anyway overwriting any duplicates.
Diffstat (limited to 'src/coins.h')
-rw-r--r--src/coins.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coins.h b/src/coins.h
index 3b45cb0a3..77b4d5648 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -428,7 +428,7 @@ public:
* would not properly overwrite the first coinbase of the pair. Simultaneous modifications
* are not allowed.
*/
- CCoinsModifier ModifyNewCoins(const uint256 &txid);
+ CCoinsModifier ModifyNewCoins(const uint256 &txid, bool coinbase);
/**
* Push the modifications applied to this cache to its base.