diff options
| author | Wladimir J. van der Laan <[email protected]> | 2013-12-04 18:28:50 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2013-12-04 18:29:00 +0100 |
| commit | 80ca273b7f34bdb60d44441a379636fa9641ec75 (patch) | |
| tree | f86a2ed2b7592e37f6a86b89417f14db30e024b9 /src/wallet.cpp | |
| parent | Merge pull request #3355 (diff) | |
| parent | Refuse to retransmit transactions without vins (diff) | |
| download | discoin-80ca273b7f34bdb60d44441a379636fa9641ec75.tar.xz discoin-80ca273b7f34bdb60d44441a379636fa9641ec75.zip | |
Merge pull request #3357
4ef92a9 Refuse to retransmit transactions without vins (Wladimir J. van der Laan)
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 14d685d6e..ab6a926f7 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -895,7 +895,10 @@ void CWalletTx::RelayWalletTransaction() { BOOST_FOREACH(const CMerkleTx& tx, vtxPrev) { - if (!tx.IsCoinBase()) + // Important: versions of bitcoin before 0.8.6 had a bug that inserted + // empty transactions into the vtxPrev, which will cause the node to be + // banned when retransmitted, hence the check for !tx.vin.empty() + if (!tx.IsCoinBase() && !tx.vin.empty()) if (tx.GetDepthInMainChain() == 0) RelayTransaction((CTransaction)tx, tx.GetHash()); } |