aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiondesc.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2018-01-08 19:39:10 +0000
committerRoss Nicoll <[email protected]>2018-09-19 21:09:16 +0100
commit7b81f4de0a006a6c01b88c79b6ab34a921eb86b5 (patch)
tree71f86cbdb71ef365ec893073d63f05ccfe1f8252 /src/qt/transactiondesc.cpp
parentCheck only the base block version (#1411) (diff)
downloaddiscoin-7b81f4de0a006a6c01b88c79b6ab34a921eb86b5.tar.xz
discoin-7b81f4de0a006a6c01b88c79b6ab34a921eb86b5.zip
Move COINBASE_MATURITY to the consensus parameters (#1426)
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r--src/qt/transactiondesc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 7e16cc9dd..d823f6273 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -10,6 +10,7 @@
#include "transactionrecord.h"
#include "base58.h"
+#include "chainparams.h"
#include "consensus/consensus.h"
#include "validation.h"
#include "script/script.h"
@@ -266,8 +267,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
if (wtx.IsCoinBase())
{
- quint32 numBlocksToMaturity = COINBASE_MATURITY + 1;
- 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>";
+ quint32 nCoinbaseMaturity = Params().GetConsensus(chainActive.Height()).nCoinbaseMaturity + 1;
+ 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(nCoinbaseMaturity)) + "<br>";
}
//