|
|
|
@ -1744,7 +1744,7 @@ void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state
@@ -1744,7 +1744,7 @@ void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight) |
|
|
|
|
void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, CTxUndo &txundo, int nHeight) |
|
|
|
|
{ |
|
|
|
|
// mark inputs spent
|
|
|
|
|
if (!tx.IsCoinBase()) { |
|
|
|
@ -1770,10 +1770,10 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
@@ -1770,10 +1770,10 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
|
|
|
|
|
inputs.ModifyNewCoins(tx.GetHash(), tx.IsCoinBase())->FromTx(tx, nHeight); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, int nHeight) |
|
|
|
|
void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight) |
|
|
|
|
{ |
|
|
|
|
CTxUndo txundo; |
|
|
|
|
UpdateCoins(tx, state, inputs, txundo, nHeight); |
|
|
|
|
UpdateCoins(tx, inputs, txundo, nHeight); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool CScriptCheck::operator()() { |
|
|
|
@ -2385,7 +2385,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
@@ -2385,7 +2385,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|
|
|
|
if (i > 0) { |
|
|
|
|
blockundo.vtxundo.push_back(CTxUndo()); |
|
|
|
|
} |
|
|
|
|
UpdateCoins(tx, state, view, i == 0 ? undoDummy : blockundo.vtxundo.back(), pindex->nHeight); |
|
|
|
|
UpdateCoins(tx, view, i == 0 ? undoDummy : blockundo.vtxundo.back(), pindex->nHeight); |
|
|
|
|
|
|
|
|
|
vPos.push_back(std::make_pair(tx.GetHash(), pos)); |
|
|
|
|
pos.nTxOffset += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION); |
|
|
|
|