> This fix is a based on the fix by Antoine Riard <ariard@student.42.fr> in
> https://github.com/bitcoin/bitcoin/pull/18600.
>
> Unlike that PR, which implements some new behavior, this just restores previous
> wallet notification and status behavior for transactions removed from the
> mempool because they conflict with transactions in a block. The behavior was
> accidentally changed in two `CWallet::BlockConnected` updates:
> a31be09bfd77eed497a8e251d31358e16e2f2eb1 and
> 7e89994133725125dddbfa8d45484e3b9ed51c6e from
> https://github.com/bitcoin/bitcoin/pull/16624, causing issue
> https://github.com/bitcoin/bitcoin/issues/18325.
>
> The change here could be improved and replaced with a more comprehensive
> cleanup, so it includes a detailed comment explaining future considerations.
>
> Co-authored-by: Antoine Riard <ariard@student.42.fr>
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/18982 | core#18982]] [1/2]
https://github.com/bitcoin/bitcoin/pull/18982/commits/b604c5c8b5892842f13dee89ae31812a28ab25d1
Backport note: We didn't have the same bug as Core, or maybe that bug was specific to RBF transactions.The test is already included in D9972, There was no nebecause it seemed to adjust the functional test,work without this fix. as it was already notifying the conflicted transactioBut now we have seen in D9972 even without this change.
Depends on D9972termittent CI failures.