Commit 1e88b7f
ModifyNewCoins saves database lookups
When processing a new transaction, in addition to spending the Coins of
its txin's it creates a new Coins for its outputs. The existing
ModifyCoins function will first make sure this Coins does not already
exist. It can not exist due to BIP 30, but because of that the lookup
can't be cached and always has to go to the database. Since we are
creating the coins to match the new tx anyway, there is no point in
checking if they exist first anyway. However this should not be used
for coinbase tx's in order to preserve the historical behavior of
overwriting the two existing duplicate tx pairs.1 parent 91c373c commit 1e88b7f
3 files changed
+31
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
124 | 134 | | |
125 | 135 | | |
126 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
427 | 438 | | |
428 | 439 | | |
429 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1720 | 1720 | | |
1721 | 1721 | | |
1722 | 1722 | | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1723 | 1733 | | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | 1734 | | |
1728 | 1735 | | |
1729 | 1736 | | |
| |||
0 commit comments