diff options
| author | Pieter Wuille <[email protected]> | 2017-04-25 11:29:29 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-06-01 11:56:06 -0700 |
| commit | 000391132608343c66488d62625c714814959bc9 (patch) | |
| tree | 0d50712acb21403a32a3a013e54bdedc2b28aeb8 /src/httpserver.cpp | |
| parent | Optimization: Coin&& to ApplyTxInUndo (diff) | |
| download | discoin-000391132608343c66488d62625c714814959bc9.tar.xz discoin-000391132608343c66488d62625c714814959bc9.zip | |
Introduce new per-txout CCoinsViewCache functions
The new functions are:
* CCoinsViewCache::AddCoin: Add a single COutPoint/Coin pair.
* CCoinsViewCache::SpendCoin: Remove a single COutPoint.
* AddCoins: utility function that invokes CCoinsViewCache::AddCoin for
each output in a CTransaction.
* AccessByTxid: utility function that searches for any output with
a given txid.
* CCoinsViewCache::AccessCoin: retrieve the Coin for a COutPoint.
* CCoinsViewCache::HaveCoins: check whether a non-empty Coin exists
for a given COutPoint.
The AddCoin and SpendCoin methods will eventually replace ModifyCoins
and ModifyNewCoins, AddCoins will replace CCoins::FromTx, and the new
AccessCoins and HaveCoins functions will replace their per-txid
counterparts.
Note that AccessCoin for now returns a copy of the Coin object. In a
later commit it will be change to returning a const reference (which
keeps working in all call sites).
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions