@@ -371,7 +371,7 @@ void CInstantSendManager::InterruptWorkerThread()
371371 workInterrupt ();
372372}
373373
374- bool CInstantSendManager::ProcessTx (const CTransaction& tx, const Consensus::Params& params)
374+ bool CInstantSendManager::ProcessTx (const CTransaction& tx, bool allowReSigning, const Consensus::Params& params)
375375{
376376 if (!IsInstantSendEnabled ()) {
377377 return true ;
@@ -441,7 +441,7 @@ bool CInstantSendManager::ProcessTx(const CTransaction& tx, const Consensus::Par
441441 return false ;
442442 }
443443 }
444- if (alreadyVotedCount == ids.size ()) {
444+ if (!allowReSigning && alreadyVotedCount == ids.size ()) {
445445 LogPrint (BCLog::INSTANTSEND, " CInstantSendManager::%s -- txid=%s: already voted on all inputs, bailing out\n " , __func__,
446446 tx.GetHash ().ToString ());
447447 return true ;
@@ -454,9 +454,9 @@ bool CInstantSendManager::ProcessTx(const CTransaction& tx, const Consensus::Par
454454 auto & in = tx.vin [i];
455455 auto & id = ids[i];
456456 inputRequestIds.emplace (id);
457- LogPrint (BCLog::INSTANTSEND, " CInstantSendManager::%s -- txid=%s: trying to vote on input %s with id %s\n " , __func__,
458- tx.GetHash ().ToString (), in.prevout .ToStringShort (), id.ToString ());
459- if (quorumSigningManager->AsyncSignIfMember (llmqType, id, tx.GetHash ())) {
457+ LogPrint (BCLog::INSTANTSEND, " CInstantSendManager::%s -- txid=%s: trying to vote on input %s with id %s. allowReSigning=%d \n " , __func__,
458+ tx.GetHash ().ToString (), in.prevout .ToStringShort (), id.ToString (), allowReSigning );
459+ if (quorumSigningManager->AsyncSignIfMember (llmqType, id, tx.GetHash (), allowReSigning )) {
460460 LogPrint (BCLog::INSTANTSEND, " CInstantSendManager::%s -- txid=%s: voted on input %s with id %s\n " , __func__,
461461 tx.GetHash ().ToString (), in.prevout .ToStringShort (), id.ToString ());
462462 }
@@ -961,7 +961,7 @@ void CInstantSendManager::UpdateWalletTransaction(const CTransactionRef& tx, con
961961 mempool.AddTransactionsUpdated (1 );
962962}
963963
964- void CInstantSendManager::ProcessNewTransaction (const CTransactionRef& tx, const CBlockIndex* pindex)
964+ void CInstantSendManager::ProcessNewTransaction (const CTransactionRef& tx, const CBlockIndex* pindex, bool allowReSigning )
965965{
966966 if (!IsInstantSendEnabled ()) {
967967 return ;
@@ -989,7 +989,7 @@ void CInstantSendManager::ProcessNewTransaction(const CTransactionRef& tx, const
989989
990990 bool chainlocked = pindex && chainLocksHandler->HasChainLock (pindex->nHeight , pindex->GetBlockHash ());
991991 if (islockHash.IsNull () && !chainlocked) {
992- ProcessTx (*tx, Params ().GetConsensus ());
992+ ProcessTx (*tx, allowReSigning, Params ().GetConsensus ());
993993 }
994994
995995 LOCK (cs);
@@ -1004,7 +1004,7 @@ void CInstantSendManager::ProcessNewTransaction(const CTransactionRef& tx, const
10041004
10051005void CInstantSendManager::TransactionAddedToMempool (const CTransactionRef& tx)
10061006{
1007- ProcessNewTransaction (tx, nullptr );
1007+ ProcessNewTransaction (tx, nullptr , false );
10081008}
10091009
10101010void CInstantSendManager::BlockConnected (const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindex, const std::vector<CTransactionRef>& vtxConflicted)
@@ -1021,7 +1021,7 @@ void CInstantSendManager::BlockConnected(const std::shared_ptr<const CBlock>& pb
10211021 }
10221022
10231023 for (const auto & tx : pblock->vtx ) {
1024- ProcessNewTransaction (tx, pindex);
1024+ ProcessNewTransaction (tx, pindex, true );
10251025 }
10261026}
10271027
@@ -1400,7 +1400,7 @@ bool CInstantSendManager::ProcessPendingRetryLockTxs()
14001400 tx->GetHash ().ToString ());
14011401 }
14021402
1403- ProcessTx (*tx, Params ().GetConsensus ());
1403+ ProcessTx (*tx, false , Params ().GetConsensus ());
14041404 retryCount++;
14051405 }
14061406
0 commit comments