diff options
author | Karl-Johan Alm <karljohan-alm@garage.co.jp> | 2021-08-25 16:37:14 +0900 |
---|---|---|
committer | Karl-Johan Alm <karljohan-alm@garage.co.jp> | 2021-10-25 16:12:19 +0900 |
commit | 96461989a2de737151bc4fb216221bf49cb53ce6 (patch) | |
tree | 28e4a2f360d323fa2d2e9ec8e89e718f9851359c /src/qt/test/wallettests.cpp | |
parent | 04437ee721e66a7b76bef5ec2f88dd1efcd03b84 (diff) | |
download | bitcoin-96461989a2de737151bc4fb216221bf49cb53ce6.tar.xz |
refactor: const shared_ptrs
Introduce convention to use const shared pointers everywhere, unless the shared pointer is modified at some point, which it very rarely is.
We want this convention, as it helps alleviate the misconception that a const shared pointer somehow results in a pointer to an immutable object, which is false.
Diffstat (limited to 'src/qt/test/wallettests.cpp')
-rw-r--r-- | src/qt/test/wallettests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index c74c8f25b3..badaf019b0 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -141,7 +141,7 @@ void TestGUI(interfaces::Node& node) 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()); + const std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), "", CreateMockWalletDatabase()); wallet->LoadWallet(); wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); { |