Skip to content

Conversation

jonasschnelli
Copy link
Contributor

Bug was introduced in #13063 (80b4910) where #13097 made possible to get "hit" by that bug. Reported by @ken2812221 (#13097 (comment)).

Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

Easy to reproduce by starting bitcoin-qt --regtest --nowallet -usehd=0 then in the console enter loadwallet wallet.dat.

This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

@promag
Copy link
Contributor

promag commented Jun 19, 2018

utACK 3a03d2a.

Bug was introduced in #13063 (80b4910)

The bug was already there before #13063, the call to uiInterface.LoadWallet(...) was already premature.

#13097 made possible to get "hit" by that bug

👍

@maflcko maflcko added this to the 0.17.0 milestone Jun 19, 2018
@maflcko
Copy link
Member

maflcko commented Jun 19, 2018

utACK 3a03d2a. I believe this is only for 0.17.0?

@promag
Copy link
Contributor

promag commented Jun 19, 2018

I believe this is only for 0.17.0?

Yes.

Copy link
Contributor

@ken2812221 ken2812221 left a comment

Choose a reason for hiding this comment

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

Tested ACK 3a03d2a

@maflcko maflcko merged commit 3a03d2a into bitcoin:master Jun 20, 2018
maflcko pushed a commit that referenced this pull request Jun 20, 2018
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in #13063 (80b4910) where #13097 made possible to get "hit" by that bug. Reported by @ken2812221 (#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 25, 2019
Summary:
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in #13063 (80b4910) where #13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin/bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f

Backport of Core PR13506
bitcoin/bitcoin#13506

Depends on D4236

Test Plan:
  make check
  bitcoin-qt --regtest --nowallet -usehd=0
  Help -> Debug -> Console
  loadwallet wallet.dat
Before this patch, the gui would throw an error window, but the wallet would still be selectable from the multiwallet drop down menu and the wallet information would still be displayed on the main window.
After this patch, the gui should throw an error window and there should still be no wallet loaded and/or displayed in the main window.
In both cases, the console will output `Wallet loading failed. (error code -4).`

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D4238
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 16, 2020
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in bitcoin#13063 (80b4910) where bitcoin#13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 18, 2020
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in bitcoin#13063 (80b4910) where bitcoin#13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Apr 4, 2021
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in bitcoin#13063 (80b4910) where bitcoin#13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Apr 4, 2021
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in bitcoin#13063 (80b4910) where bitcoin#13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Apr 4, 2021
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in bitcoin#13063 (80b4910) where bitcoin#13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Apr 4, 2021
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in bitcoin#13063 (80b4910) where bitcoin#13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Apr 5, 2021
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in bitcoin#13063 (80b4910) where bitcoin#13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Apr 13, 2021
3a03d2a Qt: load wallet in UI after possible init aborts (Jonas Schnelli)

Pull request description:

  Bug was introduced in bitcoin#13063 (80b4910) where bitcoin#13097 made possible to get "hit" by that bug. Reported by @ken2812221 (bitcoin#13097 (comment)).

  Dynamically loading a wallet informs the UI (and therefore makes the instance accessible) about the new wallet before all possible error cases where handled.

  Easy to reproduce by starting `bitcoin-qt --regtest --nowallet -usehd=0` then in the console enter `loadwallet wallet.dat`.

  This PR will make sure only correctly initialised (loaded) wallets will appear in the UI.

Tree-SHA512: 3139545e852d53b117182b579f45259c198d1c25c1a6fa4e0108f942d45f6fe2691e6bfcbbae2e18c33ad0174a520f379c17867b1eb87f950d830a5f519fec4f
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
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.

4 participants