From a0d0f9fa0c2fc42754bb5520ee14c9e5bc3a333d Mon Sep 17 00:00:00 2001 From: timemarkovqtum Date: Wed, 3 Jul 2024 10:31:16 +0200 Subject: [PATCH] Update build --- src/Makefile.am | 28 ++++++++++++++++++- src/bench/checkblock.cpp | 5 +++- src/bench/duplicate_inputs.cpp | 3 +- src/blockencodings.cpp | 4 +-- src/blockencodings.h | 2 +- src/node/miner.cpp | 14 ++++++++++ src/node/miner.h | 6 ++++ src/pos.cpp | 4 +-- src/qtum/qtumstate.cpp | 4 +-- src/test/coinstatsindex_tests.cpp | 2 +- src/test/fuzz/block.cpp | 19 +++++++++---- src/test/fuzz/partially_downloaded_block.cpp | 2 +- src/test/validation_chainstate_tests.cpp | 2 +- src/validation.cpp | 29 ++++++++++++++++---- src/validation.h | 28 ++++++++++++++++++- src/wallet/rpc/contract.cpp | 11 ++++---- src/wallet/stake.cpp | 6 ++-- 17 files changed, 136 insertions(+), 33 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index f4a7be606a..baaeab24c5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -258,6 +258,7 @@ BITCOIN_CORE_H = \ policy/rbf.h \ policy/settings.h \ pow.h \ + pos.h \ protocol.h \ psbt.h \ random.h \ @@ -275,6 +276,7 @@ BITCOIN_CORE_H = \ rpc/server.h \ rpc/server_util.h \ rpc/util.h \ + rpc/contract_util.h \ scheduler.h \ script/descriptor.h \ script/keyorigin.h \ @@ -346,6 +348,8 @@ BITCOIN_CORE_H = \ util/vector.h \ util/convert.h \ util/signstr.h \ + util/contractabi.h \ + util/tokenstr.h \ validation.h \ validationinterface.h \ versionbits.h \ @@ -363,6 +367,9 @@ BITCOIN_CORE_H = \ wallet/receive.h \ wallet/rpc/util.h \ wallet/rpc/wallet.h \ + wallet/rpc/addresses.h \ + wallet/rpc/contract.h \ + wallet/rpc/mining.h \ wallet/salvage.h \ wallet/scriptpubkeyman.h \ wallet/spend.h \ @@ -373,6 +380,7 @@ BITCOIN_CORE_H = \ wallet/walletdb.h \ wallet/wallettool.h \ wallet/walletutil.h \ + wallet/stake.h \ walletinitinterface.h \ warnings.h \ zmq/zmqabstractnotifier.h \ @@ -381,7 +389,14 @@ BITCOIN_CORE_H = \ zmq/zmqrpc.h \ zmq/zmqutil.h \ qtum/posutils.h \ + qtum/qtumstate.h \ + qtum/qtumtransaction.h \ + qtum/qtumDGP.h \ + qtum/storageresults.h \ qtum/qtumutils.h \ + qtum/qtumdelegation.h \ + qtum/qtumtoken.h \ + qtum/qtumledger.h \ qtum/delegationutils.h @@ -485,10 +500,15 @@ libbitcoin_node_a_SOURCES = \ validation.cpp \ validationinterface.cpp \ versionbits.cpp \ + qtum/qtumstate.cpp \ + qtum/storageresults.cpp \ + qtum/qtumledger.cpp \ $(BITCOIN_CORE_H) if ENABLE_WALLET -libbitcoin_node_a_SOURCES += wallet/init.cpp +libbitcoin_node_a_SOURCES += wallet/init.cpp \ + wallet/stake.cpp \ + wallet/rpc/contract.cpp libbitcoin_node_a_CPPFLAGS += $(BDB_CPPFLAGS) endif if !ENABLE_WALLET @@ -717,6 +737,7 @@ libbitcoin_common_a_SOURCES = \ policy/policy.cpp \ protocol.cpp \ psbt.cpp \ + pos.cpp \ rpc/external_signer.cpp \ rpc/rawtransaction_util.cpp \ rpc/request.cpp \ @@ -729,7 +750,11 @@ libbitcoin_common_a_SOURCES = \ script/solver.cpp \ warnings.cpp \ qtum/qtumutils.cpp \ + qtum/qtumDGP.cpp \ + qtum/qtumtoken.cpp \ + qtum/qtumdelegation.cpp \ qtum/delegationutils.cpp \ + util/contractabi.cpp \ libff/libff/algebra/curves/public_params.hpp \ libff/libff/algebra/curves/curve_utils.hpp \ evmone/include/evmone/evmone.h \ @@ -968,6 +993,7 @@ libqtum_util_a_SOURCES = \ util/string.cpp \ util/time.cpp \ util/tokenpipe.cpp \ + util/tokenstr.cpp \ $(BITCOIN_CORE_H) # diff --git a/src/bench/checkblock.cpp b/src/bench/checkblock.cpp index 792878f69c..228b18a794 100644 --- a/src/bench/checkblock.cpp +++ b/src/bench/checkblock.cpp @@ -11,6 +11,7 @@ #include #include #include +#include // These are the two major time-sinks which happen after we have fully received // a block off the wire, but before we can relay the block on to peers using @@ -38,6 +39,8 @@ static void DeserializeAndCheckBlockTest(benchmark::Bench& bench) ArgsManager bench_args; const auto chainParams = CreateChainParams(bench_args, ChainType::MAIN); + const auto testing_setup = MakeNoLogFileContext(ChainType::MAIN); + Chainstate& chainstate = testing_setup->m_node.chainman->ActiveChainstate(); bench.unit("block").run([&] { CBlock block; // Note that CBlock caches its checked state, so we need to recreate it here @@ -46,7 +49,7 @@ static void DeserializeAndCheckBlockTest(benchmark::Bench& bench) assert(rewound); BlockValidationState validationState; - bool checked = CheckBlock(block, validationState, chainParams->GetConsensus()); + bool checked = CheckBlock(block, validationState, chainParams->GetConsensus(), chainstate); assert(checked); }); } diff --git a/src/bench/duplicate_inputs.cpp b/src/bench/duplicate_inputs.cpp index b56054ae89..17d0999432 100644 --- a/src/bench/duplicate_inputs.cpp +++ b/src/bench/duplicate_inputs.cpp @@ -31,6 +31,7 @@ static void DuplicateInputs(benchmark::Bench& bench) block.nBits = GetNextWorkRequired(pindexPrev, &block, chainparams.GetConsensus()); block.nNonce = 0; auto nHeight = pindexPrev->nHeight + 1; + Chainstate& chainstate = testing_setup->m_node.chainman->ActiveChainstate(); // Make a coinbase TX coinbaseTx.vin.resize(1); @@ -58,7 +59,7 @@ static void DuplicateInputs(benchmark::Bench& bench) bench.run([&] { BlockValidationState cvstate{}; - assert(!CheckBlock(block, cvstate, chainparams.GetConsensus(), false, false)); + assert(!CheckBlock(block, cvstate, chainparams.GetConsensus(), chainstate, false, false)); assert(cvstate.GetRejectReason() == "bad-txns-inputs-duplicate"); }); } diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index 1e940e8f03..3f409ad826 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -50,7 +50,7 @@ uint64_t CBlockHeaderAndShortTxIDs::GetShortID(const uint256& txhash) const { ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, const std::vector>& extra_txn) { if (cmpctblock.header.IsNull() || (cmpctblock.shorttxids.empty() && cmpctblock.prefilledtxn.empty())) return READ_STATUS_INVALID; - if (cmpctblock.shorttxids.size() + cmpctblock.prefilledtxn.size() > MAX_BLOCK_WEIGHT / MIN_SERIALIZABLE_TRANSACTION_WEIGHT) + if (cmpctblock.shorttxids.size() + cmpctblock.prefilledtxn.size() > dgpMaxBlockWeight / MIN_SERIALIZABLE_TRANSACTION_WEIGHT) return READ_STATUS_INVALID; if (!header.IsNull() || !txn_available.empty()) return READ_STATUS_INVALID; @@ -204,7 +204,7 @@ ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector< BlockValidationState state; CheckBlockFn check_block = m_check_block_mock ? m_check_block_mock : CheckBlock; - if (!check_block(block, state, Params().GetConsensus(), /*fCheckPoW=*/true, /*fCheckMerkleRoot=*/true)) { + if (!check_block(block, state, Params().GetConsensus(), chainman->ActiveChainstate(), /*fCheckPoW=*/true, /*fCheckMerkleRoot=*/true, /*fCheckSig=*/true)) { // TODO: We really want to just check merkle tree manually here, // but that is expensive, and CheckBlock caches a block's // "checked-status" (in the CBlock?). CBlock should be able to diff --git a/src/blockencodings.h b/src/blockencodings.h index 4edbdda35d..14c0b78fc1 100644 --- a/src/blockencodings.h +++ b/src/blockencodings.h @@ -139,7 +139,7 @@ class PartiallyDownloadedBlock { CBlockHeader header; // Can be overridden for testing - using CheckBlockFn = std::function; + using CheckBlockFn = std::function; CheckBlockFn m_check_block_mock{nullptr}; explicit PartiallyDownloadedBlock(CTxMemPool* poolIn, ChainstateManager* _chainman) : pool(poolIn), chainman(_chainman) {} diff --git a/src/node/miner.cpp b/src/node/miner.cpp index 87f40e993f..4c0ee039c2 100644 --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -23,6 +23,11 @@ #include #include #include +#ifdef ENABLE_WALLET +#include +#include +#include +#endif #include #include @@ -428,4 +433,13 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele nDescendantsUpdated += UpdatePackagesForAdded(mempool, ancestors, mapModifiedTx); } } +#ifdef ENABLE_WALLET +void StakeQtums(bool fStake, wallet::CWallet *pwallet) +{ +} + +void RefreshDelegates(wallet::CWallet *pwallet, bool refreshMyDelegates, bool refreshStakerDelegates) +{ +} +#endif } // namespace node diff --git a/src/node/miner.h b/src/node/miner.h index 40f7157f46..a2d31cfe32 100644 --- a/src/node/miner.h +++ b/src/node/miner.h @@ -241,6 +241,12 @@ class BlockAssembler void SortForBlock(const CTxMemPool::setEntries& package, std::vector& sortedEntries); }; +#ifdef ENABLE_WALLET +/** Generate a new block, without valid proof-of-work */ +void StakeQtums(bool fStake, wallet::CWallet *pwallet); +void RefreshDelegates(wallet::CWallet *pwallet, bool myDelegates, bool stakerDelegates); +#endif + int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev); /** Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed */ diff --git a/src/pos.cpp b/src/pos.cpp index 4643ea3c0b..ba1b37ef9c 100644 --- a/src/pos.cpp +++ b/src/pos.cpp @@ -38,7 +38,7 @@ uint256 ComputeStakeModifier(const CBlockIndex* pindexPrev, const uint256& kerne if (!pindexPrev) return uint256(); // genesis block's modifier is 0 - CHashWriter ss(0); + HashWriter ss; ss << kernel << pindexPrev->nStakeModifier; return ss.GetHash(); } @@ -88,7 +88,7 @@ bool CheckStakeKernelHash(CBlockIndex* pindexPrev, unsigned int nBits, uint32_t uint256 nStakeModifier = pindexPrev->nStakeModifier; // Calculate hash - CHashWriter ss(0); + HashWriter ss; ss << nStakeModifier; ss << blockFromTime << prevout.hash << prevout.n << nTimeBlock; hashProofOfStake = ss.GetHash(); diff --git a/src/qtum/qtumstate.cpp b/src/qtum/qtumstate.cpp index 537c34b5a5..a991957721 100644 --- a/src/qtum/qtumstate.cpp +++ b/src/qtum/qtumstate.cpp @@ -121,7 +121,7 @@ ResultExecute QtumState::execute(EnvInfo const& _envInfo, SealEngineFace const& //create a refund tx to send back any coins that were suppose to be sent to the contract CMutableTransaction refund; if(_t.value() > 0) { - refund.vin.push_back(CTxIn(h256Touint(_t.getHashWith()), _t.getNVout(), CScript() << OP_SPEND)); + refund.vin.push_back(CTxIn(Txid::FromUint256(h256Touint(_t.getHashWith())), _t.getNVout(), CScript() << OP_SPEND)); //note, if sender was a non-standard tx, this will send the coins to pubkeyhash 0x00, effectively destroying the coins CScript script(CScript() << OP_DUP << OP_HASH160 << _t.sender().asBytes() << OP_EQUALVERIFY << OP_CHECKSIG); refund.vout.push_back(CTxOut(CAmount(_t.value().convert_to()), script)); @@ -379,7 +379,7 @@ std::vector CondensingTX::createVins(){ std::vector ins; for(auto& v : vins){ if((v.second.value > 0 && v.second.alive) || (v.second.value > 0 && !vins[v.first].alive && !checkDeleteAddress(v.first))) - ins.push_back(CTxIn(h256Touint(v.second.hash), v.second.nVout, CScript() << OP_SPEND)); + ins.push_back(CTxIn(Txid::FromUint256(h256Touint(v.second.hash)), v.second.nVout, CScript() << OP_SPEND)); } return ins; } diff --git a/src/test/coinstatsindex_tests.cpp b/src/test/coinstatsindex_tests.cpp index cc1ec49d41..090a7eea85 100644 --- a/src/test/coinstatsindex_tests.cpp +++ b/src/test/coinstatsindex_tests.cpp @@ -97,7 +97,7 @@ BOOST_FIXTURE_TEST_CASE(coinstatsindex_unclean_shutdown, TestChain100Setup) LOCK(cs_main); BlockValidationState state; - BOOST_CHECK(CheckBlock(block, state, params.GetConsensus())); + BOOST_CHECK(CheckBlock(block, state, params.GetConsensus(), chainstate)); BOOST_CHECK(m_node.chainman->AcceptBlock(new_block, state, &new_block_index, true, nullptr, nullptr, true)); CCoinsViewCache view(&chainstate.CoinsTip()); BOOST_CHECK(chainstate.ConnectBlock(block, state, new_block_index, view)); diff --git a/src/test/fuzz/block.cpp b/src/test/fuzz/block.cpp index e38b871747..5c68361e1a 100644 --- a/src/test/fuzz/block.cpp +++ b/src/test/fuzz/block.cpp @@ -13,13 +13,20 @@ #include #include #include +#include #include #include +namespace { +const TestingSetup* g_setup; + void initialize_block() { - SelectParams(ChainType::REGTEST); + SelectParams(ChainType::UNITTEST); + + static const auto testing_setup = MakeNoLogFileContext(); + g_setup = testing_setup.get(); } FUZZ_TARGET(block, .init = initialize_block) @@ -33,17 +40,18 @@ FUZZ_TARGET(block, .init = initialize_block) } const Consensus::Params& consensus_params = Params().GetConsensus(); BlockValidationState validation_state_pow_and_merkle; - const bool valid_incl_pow_and_merkle = CheckBlock(block, validation_state_pow_and_merkle, consensus_params, /* fCheckPOW= */ true, /* fCheckMerkleRoot= */ true); + auto& chainstate = g_setup->m_node.chainman->ActiveChainstate(); + const bool valid_incl_pow_and_merkle = CheckBlock(block, validation_state_pow_and_merkle, consensus_params, chainstate, /* fCheckPOW= */ true, /* fCheckMerkleRoot= */ true); assert(validation_state_pow_and_merkle.IsValid() || validation_state_pow_and_merkle.IsInvalid() || validation_state_pow_and_merkle.IsError()); (void)validation_state_pow_and_merkle.Error(""); BlockValidationState validation_state_pow; - const bool valid_incl_pow = CheckBlock(block, validation_state_pow, consensus_params, /* fCheckPOW= */ true, /* fCheckMerkleRoot= */ false); + const bool valid_incl_pow = CheckBlock(block, validation_state_pow, consensus_params, chainstate, /* fCheckPOW= */ true, /* fCheckMerkleRoot= */ false); assert(validation_state_pow.IsValid() || validation_state_pow.IsInvalid() || validation_state_pow.IsError()); BlockValidationState validation_state_merkle; - const bool valid_incl_merkle = CheckBlock(block, validation_state_merkle, consensus_params, /* fCheckPOW= */ false, /* fCheckMerkleRoot= */ true); + const bool valid_incl_merkle = CheckBlock(block, validation_state_merkle, consensus_params, chainstate, /* fCheckPOW= */ false, /* fCheckMerkleRoot= */ true); assert(validation_state_merkle.IsValid() || validation_state_merkle.IsInvalid() || validation_state_merkle.IsError()); BlockValidationState validation_state_none; - const bool valid_incl_none = CheckBlock(block, validation_state_none, consensus_params, /* fCheckPOW= */ false, /* fCheckMerkleRoot= */ false); + const bool valid_incl_none = CheckBlock(block, validation_state_none, consensus_params, chainstate, /* fCheckPOW= */ false, /* fCheckMerkleRoot= */ false); assert(validation_state_none.IsValid() || validation_state_none.IsInvalid() || validation_state_none.IsError()); if (valid_incl_pow_and_merkle) { assert(valid_incl_pow && valid_incl_merkle && valid_incl_none); @@ -66,3 +74,4 @@ FUZZ_TARGET(block, .init = initialize_block) const bool is_null = block_copy.IsNull(); assert(is_null); } +} // namespace diff --git a/src/test/fuzz/partially_downloaded_block.cpp b/src/test/fuzz/partially_downloaded_block.cpp index f6cbaced01..f3ec905234 100644 --- a/src/test/fuzz/partially_downloaded_block.cpp +++ b/src/test/fuzz/partially_downloaded_block.cpp @@ -31,7 +31,7 @@ void initialize_pdb() PartiallyDownloadedBlock::CheckBlockFn FuzzedCheckBlock(std::optional result) { - return [result](const CBlock&, BlockValidationState& state, const Consensus::Params&, bool, bool) { + return [result](const CBlock&, BlockValidationState& state, const Consensus::Params&, Chainstate& chainstate, bool, bool, bool) { if (result) { return state.Invalid(*result); } diff --git a/src/test/validation_chainstate_tests.cpp b/src/test/validation_chainstate_tests.cpp index fe2d2ba592..0cf1c77ddb 100644 --- a/src/test/validation_chainstate_tests.cpp +++ b/src/test/validation_chainstate_tests.cpp @@ -121,7 +121,7 @@ BOOST_FIXTURE_TEST_CASE(chainstate_update_tip, TestChain100Setup) // once it is changed to support multiple chainstates. { LOCK(::cs_main); - bool checked = CheckBlock(*pblockone, state, chainparams.GetConsensus()); + bool checked = CheckBlock(*pblockone, state, chainparams.GetConsensus(), chainman.ActiveChainstate()); BOOST_CHECK(checked); bool accepted = chainman.AcceptBlock( pblockone, state, &pindex, true, nullptr, &newblock, true); diff --git a/src/validation.cpp b/src/validation.cpp index 91e6c5bc42..3dfa98a735 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -109,6 +109,9 @@ const std::vector CHECKLEVEL_DOC { * */ static constexpr int PRUNE_LOCK_BUFFER{10}; +std::unique_ptr globalState; +std::shared_ptr globalSealEngine; +std::unique_ptr pstorageresult; bool fRecordLogOpcodes = false; bool fIsVMlogFile = false; bool fGettingValuesDGP = false; @@ -2195,6 +2198,15 @@ static SteadyClock::duration time_index{}; static SteadyClock::duration time_total{}; static int64_t num_blocks_total = 0; +bool GetSpentCoinFromMainChain(const CBlockIndex* pforkPrev, COutPoint prevoutStake, Coin* coin, Chainstate& chainstate) { + const CBlockIndex* pforkBase = chainstate.m_chain.FindFork(pforkPrev); + return {}; +} + +std::vector CallContract(const dev::Address& addrContract, std::vector opcode, Chainstate& chainstate, const dev::Address& sender, uint64_t gasLimit, CAmount nAmount){ + return {}; +} + /** Apply the effects of this block (with given index) on the UTXO set represented by coins. * Validity checks that depend on the UTXO set are also done; ConnectBlock() * can fail if those validity checks fail (among other reasons). */ @@ -2224,7 +2236,7 @@ bool Chainstate::ConnectBlock(const CBlock& block, BlockValidationState& state, // is enforced in ContextualCheckBlockHeader(); we wouldn't want to // re-enforce that rule here (at least until we make it impossible for // the clock to go backward). - if (!CheckBlock(block, state, params.GetConsensus(), !fJustCheck, !fJustCheck)) { + if (!CheckBlock(block, state, params.GetConsensus(), *this, !fJustCheck, !fJustCheck)) { if (state.GetResult() == BlockValidationResult::BLOCK_MUTATED) { // We don't write down blocks to disk if they may have been // corrupted, so this should be impossible unless we're having hardware @@ -3755,7 +3767,7 @@ static bool CheckWitnessMalleation(const CBlock& block, bool expect_witness_comm return true; } -bool CheckBlock(const CBlock& block, BlockValidationState& state, const Consensus::Params& consensusParams, bool fCheckPOW, bool fCheckMerkleRoot) +bool CheckBlock(const CBlock& block, BlockValidationState& state, const Consensus::Params& consensusParams, Chainstate& chainstate, bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) { // These are checks that are independent of context. @@ -4238,7 +4250,7 @@ bool ChainstateManager::AcceptBlock(const std::shared_ptr& pblock, const CChainParams& params{GetParams()}; - if (!CheckBlock(block, state, params.GetConsensus()) || + if (!CheckBlock(block, state, params.GetConsensus(), ActiveChainstate()) || !ContextualCheckBlock(block, state, *this, pindex->pprev)) { if (state.IsInvalid() && state.GetResult() != BlockValidationResult::BLOCK_MUTATED) { pindex->nStatus |= BLOCK_FAILED_VALID; @@ -4302,7 +4314,7 @@ bool ChainstateManager::ProcessNewBlock(const std::shared_ptr& blo // malleability that cause CheckBlock() to fail; see e.g. CVE-2012-2459 and // https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-February/016697.html. Because CheckBlock() is // not very expensive, the anti-DoS benefits of caching failure (of a definitely-invalid block) are not substantial. - bool ret = CheckBlock(*block, state, GetConsensus()); + bool ret = CheckBlock(*block, state, GetConsensus(), ActiveChainstate()); if (ret) { // Store to disk ret = AcceptBlock(block, state, &pindex, force_processing, nullptr, new_block, min_pow_checked); @@ -4363,7 +4375,7 @@ bool TestBlockValidity(BlockValidationState& state, // NOTE: CheckBlockHeader is called by CheckBlock if (!ContextualCheckBlockHeader(block, state, chainstate.m_blockman, chainstate.m_chainman, pindexPrev)) return error("%s: Consensus::ContextualCheckBlockHeader: %s", __func__, state.ToString()); - if (!CheckBlock(block, state, chainparams.GetConsensus(), fCheckPOW, fCheckMerkleRoot)) + if (!CheckBlock(block, state, chainparams.GetConsensus(), chainstate, fCheckPOW, fCheckMerkleRoot)) return error("%s: Consensus::CheckBlock: %s", __func__, state.ToString()); if (!ContextualCheckBlock(block, state, chainstate.m_chainman, pindexPrev)) return error("%s: Consensus::ContextualCheckBlock: %s", __func__, state.ToString()); @@ -4479,7 +4491,7 @@ VerifyDBResult CVerifyDB::VerifyDB( return VerifyDBResult::CORRUPTED_BLOCK_DB; } // check level 1: verify block validity - if (nCheckLevel >= 1 && !CheckBlock(block, state, consensus_params)) { + if (nCheckLevel >= 1 && !CheckBlock(block, state, consensus_params, chainstate,false)) { LogPrintf("Verification error: found bad block at %d, hash=%s (%s)\n", pindex->nHeight, pindex->GetBlockHash().ToString(), state.ToString()); return VerifyDBResult::CORRUPTED_BLOCK_DB; @@ -6169,3 +6181,8 @@ std::pair ChainstateManager::GetPruneRange(const Chainstate& chainstat return {prune_start, prune_end}; } + +bool GetAddressUnspent(uint256 addressHash, int type, std::vector > &unspentOutputs, node::BlockManager& blockman) +{ + return {}; +} diff --git a/src/validation.h b/src/validation.h index 4e93dd5c26..0461f42c06 100644 --- a/src/validation.h +++ b/src/validation.h @@ -44,6 +44,25 @@ #include #include +#include + +/////////////////////////////////////////// qtum +#include +#include +#include +#include +#include +#include