Merge #6174: fix: stop trying to sign pending txes when they are no longer non-locked

d8449aecf9 fix: stop trying to sign pending txes when they are no longer non-locked (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Masternodes keep trying to sign txes they received initially even after these txes were replaced by is/chain-locked txes later.

  ## What was done?
  Remove entries from `pendingRetryTxs` when txes are removed from `nonLockedTxs` set (as either already locked or as conflicted, doesn't matter).

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK d8449aecf9
  knst:
    utACK d8449aecf9

Tree-SHA512: 45983faad6d590d4e44fc195c77d73d216e3d0bebef963fe556688773c82c07a118916f56fde7f1213df19d4fb9b7d82d8fd51abecd8e6c2108c27d62d0426c1
This commit is contained in:
pasta 2024-08-05 16:12:20 +07:00
commit 46b51139f1
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -1202,6 +1202,8 @@ void CInstantSendManager::RemoveNonLockedTx(const uint256& txid, bool retryChild
retryChildrenCount++; retryChildrenCount++;
} }
} }
// don't try to lock it anymore
WITH_LOCK(cs_pendingRetry, pendingRetryTxs.erase(txid));
if (info.tx) { if (info.tx) {
for (const auto& in : info.tx->vin) { for (const auto& in : info.tx->vin) {