Skip to content

Commit c462611

Browse files
Add comment about coinstake TX checking
1 parent 08a5b48 commit c462611

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/consensus/tx_verify.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, TxValidationState& state,
195195
}
196196
}
197197

198+
// It is safe to skip the output value checks here because we ensure that a coinstake TX can only ever occur as
199+
// the second TX of a PoS block in CheckBlock and the reward amount will be checked in CChainState::ConnectBlock
198200
if (!tx.IsCoinStake()) {
199201
const CAmount value_out = tx.GetValueOut();
200202
if (nValueIn < value_out) {

0 commit comments

Comments
 (0)