Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,6 @@ libbitcoin_server_a_SOURCES = \
index/base.cpp \
index/blockfilterindex.cpp \
index/txindex.cpp \
interfaces/chain.cpp \
interfaces/node.cpp \
init.cpp \
governance/governance.cpp \
governance/classes.cpp \
Expand Down Expand Up @@ -436,6 +434,7 @@ libbitcoin_server_a_SOURCES = \
node/coin.cpp \
node/coinstats.cpp \
node/context.cpp \
node/interfaces.cpp \
node/transaction.cpp \
noui.cpp \
policy/fees.cpp \
Expand Down Expand Up @@ -495,12 +494,12 @@ libbitcoin_wallet_a_SOURCES = \
coinjoin/client.cpp \
coinjoin/options.cpp \
coinjoin/util.cpp \
interfaces/wallet.cpp \
wallet/coincontrol.cpp \
wallet/context.cpp \
wallet/crypter.cpp \
wallet/db.cpp \
wallet/fees.cpp \
wallet/interfaces.cpp \
wallet/load.cpp \
wallet/rpcdump.cpp \
wallet/rpcwallet.cpp \
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ BITCOIN_QT_H = \
qt/rpcconsole.h \
qt/sendcoinsdialog.h \
qt/sendcoinsentry.h \
qt/sendcoinsrecipient.h \
qt/signverifymessagedialog.h \
qt/splashscreen.h \
qt/trafficgraphdata.h \
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ BITCOIN_TESTS =\
test/getarg_tests.cpp \
test/governance_validators_tests.cpp \
test/hash_tests.cpp \
test/interfaces_tests.cpp \
test/key_io_tests.cpp \
test/key_tests.cpp \
test/lcg.h \
Expand Down
6 changes: 2 additions & 4 deletions src/bench/wallet_balance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const b
RegTestingSetup test_setup;
const auto& ADDRESS_WATCHONLY = ADDRESS_B58T_UNSPENDABLE;

NodeContext node;
std::unique_ptr<interfaces::Chain> chain = interfaces::MakeChain(node);
CWallet wallet{chain.get(), "", CreateMockWalletDatabase()};
CWallet wallet{test_setup.m_node.chain.get(), "", CreateMockWalletDatabase()};
{
wallet.SetupLegacyScriptPubKeyMan();
bool first_run;
if (wallet.LoadWallet(first_run) != DBErrors::LOAD_OK) assert(false);
}
auto handler = chain->handleNotifications({ &wallet, [](CWallet*) {} });
auto handler = test_setup.m_node.chain->handleNotifications({ &wallet, [](CWallet*) {} });

const std::optional<std::string> address_mine{add_mine ? std::optional<std::string>{getnewaddress(wallet)} : std::nullopt};
if (add_watchonly) importaddress(wallet, ADDRESS_WATCHONLY);
Expand Down
4 changes: 2 additions & 2 deletions src/evo/deterministicmns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ template <typename ProTx>
static bool CheckHashSig(const ProTx& proTx, const PKHash& pkhash, CValidationState& state)
{
std::string strError;
if (!CHashSigner::VerifyHash(::SerializeHash(proTx), CKeyID(pkhash), proTx.vchSig, strError)) {
if (!CHashSigner::VerifyHash(::SerializeHash(proTx), ToKeyID(pkhash), proTx.vchSig, strError)) {
return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-protx-sig");
}
return true;
Expand All @@ -1426,7 +1426,7 @@ template <typename ProTx>
static bool CheckStringSig(const ProTx& proTx, const PKHash& pkhash, CValidationState& state)
{
std::string strError;
if (!CMessageSigner::VerifyMessage(CKeyID(pkhash), proTx.vchSig, proTx.MakeSignString(), strError)) {
if (!CMessageSigner::VerifyMessage(ToKeyID(pkhash), proTx.vchSig, proTx.MakeSignString(), strError)) {
return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-protx-sig");
}
return true;
Expand Down
7 changes: 2 additions & 5 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2190,11 +2190,8 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
if (llmq::utils::IsV19Active(tip))
bls::bls_legacy_scheme.store(false);

// Only verify the DB of the active chainstate. This is fixed in later
// work when we allow VerifyDB to be parameterized by chainstate.
if (&::ChainstateActive() == chainstate &&
!CVerifyDB().VerifyDB(
chainparams, *chainstate, &chainstate->CoinsDB(),
if (!CVerifyDB().VerifyDB(
*chainstate, chainparams, chainstate->CoinsDB(),
*node.evodb,
args.GetArg("-checklevel", DEFAULT_CHECKLEVEL),
args.GetArg("-checkblocks", DEFAULT_CHECKBLOCKS))) {
Expand Down
Loading