Skip to content

Conversation

ryanofsky
Copy link
Contributor

@ryanofsky ryanofsky commented Sep 16, 2021

It looks like this should have been caught by CI but there might have been a conflict with a recently merged PR like #19101. Failure was reported by fanquake #22219 (comment)

Fix avoids null WalletClient pointer dereference in address book test by adding MakeWalletClient call and making address book test initialization more consistent with wallet test initialization:

auto wallet_client = interfaces::MakeWalletClient(*test.m_node.chain, *Assert(test.m_node.args));
test.m_node.wallet_client = wallet_client.get();
node.setContext(&test.m_node);
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), "", CreateMockWalletDatabase());

auto wallet_client = interfaces::MakeWalletClient(*test.m_node.chain, *Assert(test.m_node.args));
test.m_node.wallet_client = wallet_client.get();
node.setContext(&test.m_node);
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), "", CreateMockWalletDatabase());

It looks like this should have been caught by CI but perhaps there was a
conflict with a recently merged PR. Failure reported by fanquake <fanquake@gmail.com>
bitcoin#22219 (comment)
@ryanofsky
Copy link
Contributor Author

Updated f2c0afd -> 865ee1a (pr/sfix.1 -> pr/sfix.2, compare) just to make addressbooktests init more consistent with wallettests init, and to do more complete wallet initialization at the beginning of the test instead of partial initialization in the middle.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

ACK 865ee1a - I'm merging this now to unbreak the build.

@fanquake fanquake merged commit 9424e78 into bitcoin:master Sep 16, 2021
@bitcoin bitcoin locked and limited conversation to collaborators Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants