> "This logic is not necessary for memory pool transactions, as
> AcceptToMemoryPool already refuses previously-known transaction ids
> entirely." refers to the logic at
> https://github.com/bitcoin/bitcoin/blob/a206b0ea12eb4606b93323268fc81a4f1f952531/src/main.cpp#L484-L486,
> which was later removed in commit rABC450cbb0944cd20a06ce806e6679a1f4c83c50db2.
This is a backport of core#23173
https://github.com/bitcoin/bitcoin/pull/23173/commits/4c24142b1ec121623f81ba644d77341bc1bd88dd