Skip to content
This repository was archived by the owner on Jul 23, 2021. It is now read-only.

Commit 44671cf

Browse files
committed
Update: Correct coinbase catch for TX scanning v3
1 parent 9fc4c19 commit 44671cf

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

DigitalNote.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TEMPLATE = app
22
TARGET = DigitalNote-qt
3-
VERSION = 1.0.4.0
3+
VERSION = 1.0.4.1
44
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
55
QT += core gui widgets network printsupport
66
DEFINES += ENABLE_WALLET

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define CLIENT_VERSION_MAJOR 1
1010
#define CLIENT_VERSION_MINOR 0
1111
#define CLIENT_VERSION_REVISION 4
12-
#define CLIENT_VERSION_BUILD 0
12+
#define CLIENT_VERSION_BUILD 1
1313

1414
// Set to true for release, false for prerelease or test build
1515
#define CLIENT_VERSION_IS_RELEASE true

src/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ bool fImporting = false;
6464
bool fReindex = false;
6565
bool fAddrIndex = false;
6666
bool fHaveGUI = false;
67+
bool AcceptBlock_Tx_Scan = false;
6768

6869
struct COrphanBlock {
6970
uint256 hashBlock;
@@ -1673,8 +1674,8 @@ const CTxOut& CTransaction::GetOutputFor(const CTxIn& input, const MapPrevTx& in
16731674
const CTransaction& txPrev = (mi->second).second;
16741675
// Don't allow oversized outputs
16751676
if (input.prevout.n >= txPrev.vout.size()) {
1676-
// Skip if input is coinstake tx!
1677-
if(!IsCoinStake()) {
1677+
// Skip if queried by AcceptBlock()
1678+
if (!AcceptBlock_Tx_Scan) {
16781679
throw std::runtime_error("CTransaction::GetOutputFor() : prevout.n out of range");
16791680
}
16801681
}
@@ -1692,6 +1693,9 @@ int64_t CTransaction::GetValueMapIn(const MapPrevTx& inputs) const
16921693
{
16931694
nResult += GetOutputFor(vin[i], inputs).nValue;
16941695
}
1696+
if (AcceptBlock_Tx_Scan) {
1697+
AcceptBlock_Tx_Scan = false;
1698+
}
16951699
return nResult;
16961700

16971701
}
@@ -2961,6 +2965,7 @@ bool CBlock::AcceptBlock()
29612965
// Log inputs/output values
29622966
MapPrevTx mapInputs;
29632967
tx.GetMapTxInputs(mapInputs);
2968+
AcceptBlock_Tx_Scan = true;
29642969
// Log inputs/output values
29652970
if(tx_inputs_values + tx.GetValueMapIn(mapInputs) >= 0)
29662971
{

0 commit comments

Comments
 (0)