HomePhabricator

[backport#15713 3/5] Remove duplicate checks in SubmitMemoryPoolAndRelay

Description

[backport#15713 3/5] Remove duplicate checks in SubmitMemoryPoolAndRelay

Summary:
IsCoinBase check is already performed early by
AcceptToMemoryPoolWorker
GetDepthInMainChain check is already perfomed by
BroadcastTransaction

To avoid deadlock we MUST keep lock order in
ResendWalletTransactions and CommitTransaction,
even if we lock cs_main again further.
in BroadcastTransaction. Lock order will need
to be clean at once in a future refactoring

https://github.com/bitcoin/bitcoin/pull/15713/commits/8753f5652b4710e66b50ce87788bf6f33619b75a


Depends on D6420

Partial backport of Core PR15713

Test Plan:

ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6421

Details

Provenance
Antoine Riard <ariard@student.42.fr>Authored on Apr 11 2019, 16:01
majcostaCommitted on Jun 7 2020, 00:38
majcostaPushed on Jun 7 2020, 00:38
Reviewer
Restricted Project
Differential Revision
D6421: [backport#15713 3/5] Remove duplicate checks in SubmitMemoryPoolAndRelay
Parents
rABC5bdc385b0f6a: [backport#15713 2/5] Introduce CWalletTx::SubmitMemoryPoolAndRelay
Branches
Unknown
Tags
Unknown