Skip to content

Conversation

furszy
Copy link
Member

@furszy furszy commented Mar 23, 2023

Fixes #27316

Because wallets are internally synchronized through the validation interface,
and the interface dispatches events on a worker thread, it is possible for a
transaction created by the first wallet to not arrive to the second wallet
before the second wallet attempts to use one of its outputs. This is because
we do not wait for the BroadcastTransaction callback during the wallet's
"submit to mempool" process. To address this in the tests, we need to
manually sync the validation queue.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 23, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK josibake, theStack

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Mar 23, 2023
Because wallets are internally synchronized
through the validation interface, and the
interface dispatches events on a worker thread,
it is possible for a transaction created by the
first wallet to not arrive at the second wallet
before the second wallet attempts to use one of
its outputs. This is because we do not wait for
the BroadcastTransaction callback during the wallet's
"submit to mempool" process. To address this in the
tests, we need to sync the validation queue.
@josibake
Copy link
Member

ACK 8aab515

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8aab515

@fanquake fanquake merged commit 6882828 into bitcoin:master Mar 28, 2023
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 28, 2023
8aab515 test: wallet_create_tx.py fix race (furszy)

Pull request description:

  Fixes bitcoin#27316

  Because wallets are internally synchronized through the validation interface,
  and the interface dispatches events on a worker thread, it is possible for a
  transaction created by the first wallet to not arrive to the second wallet
  before the second wallet attempts to use one of its outputs. This is because
  we do not wait for the `BroadcastTransaction` callback during the wallet's
  "submit to mempool" process. To address this in the tests, we need to
  manually sync the validation queue.

ACKs for top commit:
  josibake:
    ACK bitcoin@8aab515
  theStack:
    ACK 8aab515

Tree-SHA512: 76364370ab292a5c3ea1ed61cd353fc626a9e9cd6ce18464c24da1b3dcb34b65006e2bc42b84bbd25af03f9449231990bf789504728972db3217b569099eb309
@furszy furszy deleted the 2022_walletcreatetx_fix_race branch May 27, 2023 01:44
@bitcoin bitcoin locked and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wallet_create_tx.py "Not solvable pre-selected input" exception
5 participants