MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / checkBlock

Method checkBlock

src/node/interfaces.cpp:1017–1024  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015 }
1016
1017 bool checkBlock(const CBlock& block, const node::BlockCheckOptions& options, std::string& reason, std::string& debug) override
1018 {
1019 LOCK(chainman().GetMutex());
1020 BlockValidationState state{TestBlockValidity(chainman().ActiveChainstate(), block, /*check_pow=*/options.check_pow, /*check_merkle_root=*/options.check_merkle_root)};
1021 reason = state.GetRejectReason();
1022 debug = state.GetDebugMessage();
1023 return state.IsValid();
1024 }
1025
1026 bool submitBlock(const CBlock& block_in, std::string& reason, std::string& debug) override
1027 {

Callers 2

async_routineMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 4

TestBlockValidityFunction · 0.85
GetRejectReasonMethod · 0.80
GetDebugMessageMethod · 0.80
IsValidMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64