Fix init segfault where InitLoadWallet() calls ATMP before genesis#8928
Fix init segfault where InitLoadWallet() calls ATMP before genesis#8928laanwj merged 1 commit intobitcoin:masterfrom
Conversation
| uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait); | ||
| } | ||
|
|
||
| #ifdef ENABLE_WALLET |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Yes I agree, let's merge this as it is a necessary bugfix, this can be improved later.
|
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(); |
There was a problem hiding this comment.
Meh on extending the usage of pwalletMain in init.cpp. If this is really necessary, can't we pack it "behind" CWallet?
There was a problem hiding this comment.
Or what about moving down the if (!CWallet::InitLoadWallet()) from L1426 to the part?
…re genesis 37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
…MP before genesis 37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
…MP before genesis 37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
I honestly have no idea how the wallet.py tests are passing for anyone, but they reliably cause segfault here for me.