diff options
| author | MarcoFalke <[email protected]> | 2018-01-27 17:45:32 -0500 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-02-06 09:54:31 -0500 |
| commit | fa795cf9c52b82cc3cccd21483360d6e03f767f0 (patch) | |
| tree | d06ffc7091c67a6bbd0f9ddfa11d893f1b3afde6 /src/wallet/wallet.cpp | |
| parent | Merge #12264: Fix versionbits warning test (diff) | |
| download | discoin-fa795cf9c52b82cc3cccd21483360d6e03f767f0.tar.xz discoin-fa795cf9c52b82cc3cccd21483360d6e03f767f0.zip | |
wallet: Disallow abandon of conflicted txes
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 07a23ce24..258161cff 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1083,7 +1083,7 @@ bool CWallet::TransactionCanBeAbandoned(const uint256& hashTx) const { LOCK2(cs_main, cs_wallet); const CWalletTx* wtx = GetWalletTx(hashTx); - return wtx && !wtx->isAbandoned() && wtx->GetDepthInMainChain() <= 0 && !wtx->InMempool(); + return wtx && !wtx->isAbandoned() && wtx->GetDepthInMainChain() == 0 && !wtx->InMempool(); } bool CWallet::AbandonTransaction(const uint256& hashTx) @@ -1099,7 +1099,7 @@ bool CWallet::AbandonTransaction(const uint256& hashTx) auto it = mapWallet.find(hashTx); assert(it != mapWallet.end()); CWalletTx& origtx = it->second; - if (origtx.GetDepthInMainChain() > 0 || origtx.InMempool()) { + if (origtx.GetDepthInMainChain() != 0 || origtx.InMempool()) { return false; } |