refactor: move BIP39 related code to wallet

This commit is contained in:
Konstantin Akimov 2024-02-01 01:17:56 +07:00
parent fa6519f320
commit e8f84afd3e
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524
8 changed files with 16 additions and 16 deletions

View File

@ -138,8 +138,6 @@ BITCOIN_CORE_H = \
base58.h \
batchedlogger.h \
bech32.h \
bip39.h \
bip39_english.h \
blockencodings.h \
bloom.h \
cachemap.h \
@ -364,6 +362,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 \
@ -540,6 +540,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 \
@ -708,7 +709,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 \

View File

@ -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 \
@ -181,6 +180,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 \

View File

@ -24,8 +24,8 @@
// Source:
// https://github.com/trezor/trezor-crypto
#include <bip39.h>
#include <bip39_english.h>
#include <wallet/bip39.h>
#include <wallet/bip39_english.h>
#include <crypto/pkcs5_pbkdf2_hmac_sha512.h>
#include <crypto/sha256.h>
#include <random.h>

View File

@ -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 <support/allocators/secure.h>
@ -36,4 +36,4 @@ public:
static void ToSeed(SecureString mnemonic, SecureString passphrase, SecureVector& seedRet);
};
#endif // BITCOIN_BIP39_H
#endif // BITCOIN_WALLET_BIP39_H

View File

@ -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

View File

@ -3,7 +3,7 @@
#include <wallet/hdchain.h>
#include <bip39.h>
#include <wallet/bip39.h>
#include <chainparams.h>
#include <key_io.h>
#include <tinyformat.h>

View File

@ -20,12 +20,12 @@
#ifdef USE_BDB
#include <wallet/bdb.h>
#endif
#include <wallet/bip39.h>
#include <wallet/coincontrol.h>
#include <wallet/hdchain.h>
#include <wallet/wallet.h>
#include <walletinitinterface.h>
#include <bip39.h>
#include <coinjoin/client.h>
#include <coinjoin/options.h>

View File

@ -4,7 +4,7 @@
#include <test/data/bip39_vectors.json.h>
#include <bip39.h>
#include <wallet/bip39.h>
#include <key.h>
#include <key_io.h>
#include <test/util/setup_common.h>