From 7c611e20007bf5face34d33dffa26c8db67e29ec Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Thu, 6 Jun 2019 09:53:16 +0200 Subject: [PATCH 1/2] Move ismine to wallet module --- src/Makefile.am | 4 +- src/Makefile.test.include | 3 +- src/interfaces/wallet.cpp | 2 +- src/interfaces/wallet.h | 4 +- src/qt/transactiondesc.cpp | 1 + src/qt/transactionrecord.cpp | 1 + src/test/script_p2sh_tests.cpp | 3 - src/test/script_standard_tests.cpp | 361 --------------------------- src/{script => wallet}/ismine.cpp | 2 +- src/{script => wallet}/ismine.h | 8 +- src/wallet/test/ismine_tests.cpp | 378 +++++++++++++++++++++++++++++ src/wallet/wallet.h | 2 +- src/wallet/wallettool.h | 2 +- 13 files changed, 395 insertions(+), 376 deletions(-) rename src/{script => wallet}/ismine.cpp (99%) rename src/{script => wallet}/ismine.h (90%) create mode 100644 src/wallet/test/ismine_tests.cpp diff --git a/src/Makefile.am b/src/Makefile.am index ec3d81b76fb..39e8d3d6897 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -181,7 +181,6 @@ BITCOIN_CORE_H = \ rpc/util.h \ scheduler.h \ script/descriptor.h \ - script/ismine.h \ script/sigcache.h \ script/sign.h \ script/standard.h \ @@ -223,6 +222,7 @@ BITCOIN_CORE_H = \ wallet/db.h \ wallet/feebumper.h \ wallet/fees.h \ + wallet/ismine.h \ wallet/load.h \ wallet/psbtwallet.h \ wallet/rpcwallet.h \ @@ -328,6 +328,7 @@ libbitcoin_wallet_a_SOURCES = \ wallet/db.cpp \ wallet/feebumper.cpp \ wallet/fees.cpp \ + wallet/ismine.cpp \ wallet/load.cpp \ wallet/psbtwallet.cpp \ wallet/rpcdump.cpp \ @@ -458,7 +459,6 @@ libbitcoin_common_a_SOURCES = \ rpc/util.cpp \ scheduler.cpp \ script/descriptor.cpp \ - script/ismine.cpp \ script/sign.cpp \ script/standard.cpp \ versionbitsinfo.cpp \ diff --git a/src/Makefile.test.include b/src/Makefile.test.include index c9c029818e0..d3fe138133e 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -167,7 +167,8 @@ BITCOIN_TESTS += \ wallet/test/wallet_tests.cpp \ wallet/test/wallet_crypto_tests.cpp \ wallet/test/coinselector_tests.cpp \ - wallet/test/init_tests.cpp + wallet/test/init_tests.cpp \ + wallet/test/ismine_tests.cpp BITCOIN_TEST_SUITE += \ wallet/test/wallet_test_fixture.cpp \ diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index 240670cbe76..34c982e1e68 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -11,7 +11,6 @@ #include #include #include -#include