Skip to content

Commit b708db3

Browse files
author
limxdev
committed
src\qt\transactiondesc.cpp
1 parent 4dad51a commit b708db3

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/consensus/tx_verify.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, c
252252
}
253253
*/
254254
// BTX END
255+
256+
// Check for negative or overflow input values
257+
nValueIn += coin.out.nValue;
258+
if (!MoneyRange(coin.out.nValue) || !MoneyRange(nValueIn)) {
259+
return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputvalues-outofrange");
260+
}
255261
}
256262

257263
const CAmount value_out = tx.GetValueOut();

src/qt/transactiondesc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall
281281

282282
//quint32 numBlocksToMaturity = COINBASE_MATURITY + 1;
283283
// BTX BEGIN
284-
quint32 numBlocksToMaturity = (!sporkManager.IsSporkActive(SPORK_BTX_15_COINBASE_MATURITY_STAGE_2)? COINBASE_MATURITY : COINBASE_MATURITY_2 ) + 1;
284+
quint32 numBlocksToMaturity = (!sporkManager.IsSporkActive(SPORK_BTX_16_COINBASE_MATURITY_STAGE_3)? COINBASE_MATURITY_2 : COINBASE_MATURITY_3 ) + 1;
285285
// BTX END
286286
strHTML += "<br>" + tr("Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.").arg(QString::number(numBlocksToMaturity)) + "<br>";
287287
}

0 commit comments

Comments
 (0)