diff --git a/src/Makefile.am b/src/Makefile.am index 240ee254c395fc..851cddf093775a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -138,8 +138,6 @@ BITCOIN_CORE_H = \ base58.h \ batchedlogger.h \ bech32.h \ - bip39.h \ - bip39_english.h \ blockencodings.h \ bloom.h \ cachemap.h \ @@ -363,6 +361,8 @@ BITCOIN_CORE_H = \ validationinterface.h \ versionbits.h \ wallet/bdb.h \ + wallet/bip39.h \ + wallet/bip39_english.h \ wallet/coincontrol.h \ wallet/coinselection.h \ wallet/context.h \ @@ -538,6 +538,7 @@ libbitcoin_wallet_a_SOURCES = \ coinjoin/client.cpp \ coinjoin/interfaces.cpp \ coinjoin/util.cpp \ + wallet/bip39.cpp \ wallet/coincontrol.cpp \ wallet/context.cpp \ wallet/crypter.cpp \ @@ -706,7 +707,6 @@ libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libbitcoin_common_a_SOURCES = \ base58.cpp \ bech32.cpp \ - bip39.cpp \ bloom.cpp \ chainparams.cpp \ coins.cpp \ diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 77e5127fcc7944..9be903ca2ed9dd 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -46,8 +46,8 @@ FUZZ_SUITE_LD_COMMON = \ $(LIBTEST_FUZZ) \ $(LIBTEST_UTIL) \ $(LIBBITCOIN_CONSENSUS) \ - $(LIBBITCOIN_CRYPTO) \ $(LIBBITCOIN_WALLET) \ + $(LIBBITCOIN_CRYPTO) \ $(LIBBITCOIN_CLI) \ $(LIBDASHBLS) \ $(BDB_LIBS) \ @@ -83,7 +83,6 @@ BITCOIN_TESTS =\ test/base64_tests.cpp \ test/bech32_tests.cpp \ test/bip32_tests.cpp \ - test/bip39_tests.cpp \ test/block_reward_reallocation_tests.cpp \ test/blockchain_tests.cpp \ test/blockencodings_tests.cpp \ @@ -179,6 +178,7 @@ BITCOIN_TESTS =\ if ENABLE_WALLET BITCOIN_TESTS += \ + wallet/test/bip39_tests.cpp \ wallet/test/coinjoin_tests.cpp \ wallet/test/psbt_wallet_tests.cpp \ wallet/test/wallet_tests.cpp \ diff --git a/src/bip39.cpp b/src/wallet/bip39.cpp similarity index 98% rename from src/bip39.cpp rename to src/wallet/bip39.cpp index 0cae4f43ea87d6..2cf0eb79c7a94a 100644 --- a/src/bip39.cpp +++ b/src/wallet/bip39.cpp @@ -24,8 +24,8 @@ // Source: // https://github.com/trezor/trezor-crypto -#include -#include +#include +#include #include #include #include diff --git a/src/bip39.h b/src/wallet/bip39.h similarity index 94% rename from src/bip39.h rename to src/wallet/bip39.h index 30f3a6880e2c7b..b8bf2262ae91a9 100644 --- a/src/bip39.h +++ b/src/wallet/bip39.h @@ -21,8 +21,8 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef BITCOIN_BIP39_H -#define BITCOIN_BIP39_H +#ifndef BITCOIN_WALLET_BIP39_H +#define BITCOIN_WALLET_BIP39_H #include @@ -36,4 +36,4 @@ class CMnemonic static void ToSeed(SecureString mnemonic, SecureString passphrase, SecureVector& seedRet); }; -#endif // BITCOIN_BIP39_H +#endif // BITCOIN_WALLET_BIP39_H diff --git a/src/bip39_english.h b/src/wallet/bip39_english.h similarity index 99% rename from src/bip39_english.h rename to src/wallet/bip39_english.h index 961157479ccbb1..19547f512fa1f7 100644 --- a/src/bip39_english.h +++ b/src/wallet/bip39_english.h @@ -21,8 +21,8 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef BITCOIN_BIP39_ENGLISH_H -#define BITCOIN_BIP39_ENGLISH_H +#ifndef BITCOIN_WALLET_BIP39_ENGLISH_H +#define BITCOIN_WALLET_BIP39_ENGLISH_H const char * const wordlist[] = { "abandon", @@ -2076,4 +2076,4 @@ const char * const wordlist[] = { 0, }; -#endif // BITCOIN_BIP39_ENGLISH_H +#endif // BITCOIN_WALLET_BIP39_ENGLISH_H diff --git a/src/wallet/hdchain.cpp b/src/wallet/hdchain.cpp index 6b76e6c69700a6..d3ccf7255da38c 100644 --- a/src/wallet/hdchain.cpp +++ b/src/wallet/hdchain.cpp @@ -3,7 +3,7 @@ #include -#include +#include #include #include #include diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index 3a939283820382..65c469d602d5ab 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -20,12 +20,12 @@ #ifdef USE_BDB #include #endif +#include #include #include #include #include -#include #include #include diff --git a/src/test/bip39_tests.cpp b/src/wallet/test/bip39_tests.cpp similarity index 98% rename from src/test/bip39_tests.cpp rename to src/wallet/test/bip39_tests.cpp index c35b00c4eafff8..342321099e5fb7 100644 --- a/src/test/bip39_tests.cpp +++ b/src/wallet/test/bip39_tests.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include #include #include