diff --git a/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in b/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in
index 48a117bcfe..0b4aa1e407 100644
--- a/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in
+++ b/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in
@@ -151,6 +151,9 @@
@SOURCE_FILES@
+
+ $(IntDir)wallet_init.obj
+
diff --git a/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj b/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
index a32aafbd74..227b1ebcd2 100644
--- a/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
+++ b/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
@@ -22,6 +22,7 @@
+
diff --git a/src/Makefile.am b/src/Makefile.am
index 15daf562ff..5810620817 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -130,6 +130,7 @@ BITCOIN_CORE_H = \
compressor.h \
confidential_validation.h \
consensus/consensus.h \
+ consensus/tx_check.h \
consensus/tx_verify.h \
core_io.h \
core_memusage.h \
@@ -163,6 +164,7 @@ BITCOIN_CORE_H = \
netbase.h \
netmessagemaker.h \
node/coin.h \
+ node/psbt.h \
node/transaction.h \
noui.h \
optional.h \
@@ -172,6 +174,7 @@ BITCOIN_CORE_H = \
policy/fees.h \
policy/policy.h \
policy/rbf.h \
+ policy/settings.h \
pow.h \
protocol.h \
psbt.h \
@@ -183,7 +186,7 @@ BITCOIN_CORE_H = \
rpc/mining.h \
rpc/protocol.h \
rpc/server.h \
- rpc/rawtransaction.h \
+ rpc/rawtransaction_util.h \
rpc/register.h \
rpc/util.h \
scheduler.h \
@@ -211,10 +214,15 @@ BITCOIN_CORE_H = \
undo.h \
util/bip32.h \
util/bytevectorhash.h \
+ util/error.h \
+ util/fees.h \
util/system.h \
util/memory.h \
util/moneystr.h \
+ util/rbf.h \
util/time.h \
+ util/url.h \
+ util/validation.h \
validation.h \
validationinterface.h \
versionbits.h \
@@ -225,6 +233,7 @@ BITCOIN_CORE_H = \
wallet/db.h \
wallet/feebumper.h \
wallet/fees.h \
+ wallet/load.h \
wallet/psbtwallet.h \
wallet/rpcwallet.h \
wallet/wallet.h \
@@ -247,6 +256,9 @@ obj/build.h: FORCE
libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
# server: shared between bitcoind and bitcoin-qt
+# Contains code accessing mempool and chain state that is meant to be separated
+# from wallet and gui code (see node/README.md). Shared code should go in
+# libbitcoin_common or libbitcoin_util libraries, instead.
libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_server_a_SOURCES = \
@@ -254,7 +266,6 @@ libbitcoin_server_a_SOURCES = \
addrman.cpp \
assetsdir.cpp \
banman.cpp \
- bloom.cpp \
blockencodings.cpp \
blockfilter.cpp \
block_proof.cpp \
@@ -268,23 +279,21 @@ libbitcoin_server_a_SOURCES = \
index/base.cpp \
index/txindex.cpp \
interfaces/chain.cpp \
- interfaces/handler.cpp \
interfaces/node.cpp \
init.cpp \
dbwrapper.cpp \
mainchainrpc.cpp \
- merkleblock.cpp \
miner.cpp \
net.cpp \
net_processing.cpp \
node/coin.cpp \
+ node/psbt.cpp \
node/transaction.cpp \
noui.cpp \
- outputtype.cpp \
pegins.cpp \
policy/fees.cpp \
- policy/policy.cpp \
policy/rbf.cpp \
+ policy/settings.cpp \
pow.cpp \
rest.cpp \
rpc/blockchain.cpp \
@@ -293,7 +302,6 @@ libbitcoin_server_a_SOURCES = \
rpc/net.cpp \
rpc/rawtransaction.cpp \
rpc/server.cpp \
- rpc/util.cpp \
script/sigcache.cpp \
shutdown.cpp \
timedata.cpp \
@@ -306,6 +314,9 @@ libbitcoin_server_a_SOURCES = \
versionbits.cpp \
$(BITCOIN_CORE_H)
+if ENABLE_WALLET
+libbitcoin_server_a_SOURCES += wallet/init.cpp
+endif
if !ENABLE_WALLET
libbitcoin_server_a_SOURCES += dummywallet.cpp
endif
@@ -333,7 +344,7 @@ libbitcoin_wallet_a_SOURCES = \
wallet/db.cpp \
wallet/feebumper.cpp \
wallet/fees.cpp \
- wallet/init.cpp \
+ wallet/load.cpp \
wallet/psbtwallet.cpp \
wallet/rpcdump.cpp \
wallet/rpcwallet.cpp \
@@ -410,6 +421,7 @@ libbitcoin_consensus_a_SOURCES = \
consensus/merkle.cpp \
consensus/merkle.h \
consensus/params.h \
+ consensus/tx_check.cpp \
consensus/validation.h \
hash.cpp \
hash.h \
@@ -456,6 +468,7 @@ libbitcoin_common_a_SOURCES = \
bech32.cpp \
blech32.cpp \
blind.cpp \
+ bloom.cpp \
chainparams.cpp \
coins.cpp \
compressor.cpp \
@@ -465,11 +478,16 @@ libbitcoin_common_a_SOURCES = \
key.cpp \
key_io.cpp \
keystore.cpp \
+ merkleblock.cpp \
netaddress.cpp \
netbase.cpp \
+ outputtype.cpp \
policy/feerate.cpp \
+ policy/policy.cpp \
protocol.cpp \
psbt.cpp \
+ rpc/rawtransaction_util.cpp \
+ rpc/util.cpp \
scheduler.cpp \
script/descriptor.cpp \
script/ismine.cpp \
@@ -492,6 +510,7 @@ libbitcoin_util_a_SOURCES = \
compat/glibcxx_sanity.cpp \
compat/strnlen.cpp \
fs.cpp \
+ interfaces/handler.cpp \
logging.cpp \
random.cpp \
rpc/protocol.cpp \
@@ -500,10 +519,15 @@ libbitcoin_util_a_SOURCES = \
threadinterrupt.cpp \
util/bip32.cpp \
util/bytevectorhash.cpp \
+ util/error.cpp \
+ util/fees.cpp \
util/system.cpp \
util/moneystr.cpp \
+ util/rbf.cpp \
util/strencodings.cpp \
util/time.cpp \
+ util/url.cpp \
+ util/validation.cpp \
$(BITCOIN_CORE_H)
if GLIBC_BACK_COMPAT
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index e68279adcf..bc0dd49792 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -19,6 +19,7 @@
#include