mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
refactor: pcoinsTip -> CChainState::CoinsTip()
This aliasing makes subsequent commits easier to review; eventually CoinsTip() will return the CCoinsViewCache managed by CChainState.
This commit is contained in:
parent
e5fdda68c6
commit
fae6ab6aed
13 changed files with 70 additions and 58 deletions
|
|
@ -25,7 +25,7 @@ TransactionError BroadcastTransaction(const CTransactionRef tx, std::string& err
|
|||
LOCK(cs_main);
|
||||
// If the transaction is already confirmed in the chain, don't do anything
|
||||
// and return early.
|
||||
CCoinsViewCache &view = *pcoinsTip;
|
||||
CCoinsViewCache &view = ::ChainstateActive().CoinsTip();
|
||||
for (size_t o = 0; o < tx->vout.size(); o++) {
|
||||
const Coin& existingCoin = view.AccessCoin(COutPoint(hashTx, o));
|
||||
// IsSpent doesnt mean the coin is spent, it means the output doesnt' exist.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue