Skip to content

Commit 6702048

Browse files
committed
MOVEONLY: Move key handling code out of wallet to keyman file
Start moving wallet and ismine code to scriptpubkeyman.h, scriptpubkeyman.cpp The easiest way to review this commit is to run: git log -p -n1 --color-moved=dimmed_zebra And check that everything is a move (other than includes and copyrights comments). This commit is move-only and doesn't change code or affect behavior.
1 parent ab053ec commit 6702048

10 files changed

+1394
-1368
lines changed

src/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ BITCOIN_CORE_H = \
235235
wallet/load.h \
236236
wallet/psbtwallet.h \
237237
wallet/rpcwallet.h \
238+
wallet/scriptpubkeyman.h \
238239
wallet/wallet.h \
239240
wallet/walletdb.h \
240241
wallet/wallettool.h \
@@ -338,11 +339,11 @@ libbitcoin_wallet_a_SOURCES = \
338339
wallet/db.cpp \
339340
wallet/feebumper.cpp \
340341
wallet/fees.cpp \
341-
wallet/ismine.cpp \
342342
wallet/load.cpp \
343343
wallet/psbtwallet.cpp \
344344
wallet/rpcdump.cpp \
345345
wallet/rpcwallet.cpp \
346+
wallet/scriptpubkeyman.cpp \
346347
wallet/wallet.cpp \
347348
wallet/walletdb.cpp \
348349
wallet/walletutil.cpp \

src/script/signingprovider.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ FlatSigningProvider Merge(const FlatSigningProvider& a, const FlatSigningProvide
6363
class FillableSigningProvider : public SigningProvider
6464
{
6565
protected:
66-
mutable CCriticalSection cs_KeyStore;
67-
6866
using KeyMap = std::map<CKeyID, CKey>;
6967
using ScriptMap = std::map<CScriptID, CScript>;
7068

@@ -74,6 +72,8 @@ class FillableSigningProvider : public SigningProvider
7472
void ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore);
7573

7674
public:
75+
mutable CCriticalSection cs_KeyStore;
76+
7777
virtual bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey);
7878
virtual bool AddKey(const CKey &key) { return AddKeyPubKey(key, key.GetPubKey()); }
7979
virtual bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const override;

src/util/translation.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#define BITCOIN_UTIL_TRANSLATION_H
77

88
#include <tinyformat.h>
9-
9+
#include <functional>
1010

1111
/**
1212
* Bilingual messages:

src/wallet/init.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <util/moneystr.h>
1111
#include <util/system.h>
1212
#include <util/translation.h>
13+
#include <wallet/scriptpubkeyman.h>
1314
#include <wallet/wallet.h>
1415
#include <walletinitinterface.h>
1516

src/wallet/ismine.cpp

-192
This file was deleted.

0 commit comments

Comments
 (0)