aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/util.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2021-06-04 17:28:46 -0400
committerRussell Yanofsky <russ@yanofsky.org>2021-06-12 11:22:41 -0400
commit2565478c813fb7278153b113de4b9338fc186872 (patch)
treef9144b803204daef6d049c6959c2f4f119767ea5 /src/wallet/test/util.h
parentb0e5fbf6fad854ad03ce092ff5f1582166e5b24e (diff)
downloadbitcoin-2565478c813fb7278153b113de4b9338fc186872.tar.xz
wallet test refactor: add CreateSyncedWallet function
No change in behavior. This just moves some code from the ListCoins test setup to a reusable util function, so it can be reused in a new test in the next commit.
Diffstat (limited to 'src/wallet/test/util.h')
-rw-r--r--src/wallet/test/util.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/wallet/test/util.h b/src/wallet/test/util.h
new file mode 100644
index 0000000000..288c111571
--- /dev/null
+++ b/src/wallet/test/util.h
@@ -0,0 +1,19 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_WALLET_TEST_UTIL_H
+#define BITCOIN_WALLET_TEST_UTIL_H
+
+#include <memory>
+
+class CChain;
+class CKey;
+class CWallet;
+namespace interfaces {
+class Chain;
+} // namespace interfaces
+
+std::unique_ptr<CWallet> CreateSyncedWallet(interfaces::Chain& chain, CChain& cchain, const CKey& key);
+
+#endif // BITCOIN_WALLET_TEST_UTIL_H