Avoid relaying expired transactions which causes other nodes to ban us
This commit is contained in:
@@ -3121,6 +3121,13 @@ std::vector<uint256> CWallet::ResendWalletTransactionsBefore(int64_t nTime)
|
|||||||
if (wtx.nTimeReceived > nTime)
|
if (wtx.nTimeReceived > nTime)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Do not relay expired transactions, to avoid other nodes banning us
|
||||||
|
if (wtx.nExpiryHeight > 0 && wtx.nExpiryHeight < chainActive.LastTip->GetHeight()) {
|
||||||
|
fprintf(stderr,"%s: ignoring expired tx %s\n", wtx.GetHash().ToString().c_str() );
|
||||||
|
// TODO: should we call EraseFromWallet(wtx) right here?
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ( (wtx.nLockTime >= LOCKTIME_THRESHOLD && wtx.nLockTime < now-HUSH_MAXMEMPOOLTIME) )
|
if ( (wtx.nLockTime >= LOCKTIME_THRESHOLD && wtx.nLockTime < now-HUSH_MAXMEMPOOLTIME) )
|
||||||
{
|
{
|
||||||
if(fDebug) {
|
if(fDebug) {
|
||||||
|
|||||||
Reference in New Issue
Block a user