Skip to content

Conversation

TheBlueMatt
Copy link
Contributor

I honestly have no idea how the wallet.py tests are passing for anyone, but they reliably cause segfault here for me.

@maflcko
Copy link
Member

maflcko commented Oct 16, 2016

utACK 37aefff

Edit: Indeed interesting that this does not fail on trusty.

Tested ACK 37aefff, otherwise.

@maflcko maflcko added the Wallet label Oct 16, 2016
@@ -1488,6 +1488,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait);
}

#ifdef ENABLE_WALLET
Copy link
Member

Choose a reason for hiding this comment

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

It's unfortunate that this has to introduce a new #ifdef ENABLE_WALLET here, and ref to pWalletMain.
We're trying to get rid of them to remove the circular dependency between_wallet and _server libs (#7965), and in the interest of multi-wallet support.

Copy link
Member

Choose a reason for hiding this comment

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

It could be combined with the guard a few lines below, but this won't solve the larger problem.

I think for a bugfix this is fine.

Copy link
Member

Choose a reason for hiding this comment

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

Yes I agree, let's merge this as it is a necessary bugfix, this can be improved later.

@laanwj
Copy link
Member

laanwj commented Oct 18, 2016

utACK otherwise

// Add wallet transactions that aren't already in a block to mempool
// Do this here as mempool requires genesis block to be loaded
if (pwalletMain)
pwalletMain->ReacceptWalletTransactions();
Copy link
Contributor

@jonasschnelli jonasschnelli Oct 17, 2016

Choose a reason for hiding this comment

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

Meh on extending the usage of pwalletMain in init.cpp. If this is really necessary, can't we pack it "behind" CWallet?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or what about moving down the if (!CWallet::InitLoadWallet()) from L1426 to the part?

Copy link
Member

Choose a reason for hiding this comment

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

@jonasschnelli we can do this later

@laanwj laanwj merged commit 37aefff into bitcoin:master Oct 19, 2016
laanwj added a commit that referenced this pull request Oct 19, 2016
…re genesis

37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
codablock pushed a commit to codablock/dash that referenced this pull request Jan 9, 2018
…MP before genesis

37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
…MP before genesis

37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
@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