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

Method Finalize

src/headerssync.cpp:51–63  ·  view source on GitHub ↗

Free any memory in use, and mark this object as no longer usable. This is * required to guarantee that we won't reuse this object with the same * SaltedUint256Hasher for another sync. */

Source from the content-addressed store, hash-verified

49 * required to guarantee that we won't reuse this object with the same
50 * SaltedUint256Hasher for another sync. */
51void HeadersSyncState::Finalize()
52{
53 Assume(m_download_state != State::FINAL);
54 ClearShrink(m_header_commitments);
55 m_last_header_received.SetNull();
56 ClearShrink(m_redownloaded_headers);
57 m_redownload_buffer_last_hash.SetNull();
58 m_redownload_buffer_first_prev_hash.SetNull();
59 m_process_all_remaining_headers = false;
60 m_current_height = 0;
61
62 m_download_state = State::FINAL;
63}
64
65/** Process the next batch of headers received from our peer.
66 * Validate and store commitments, and compare total chainwork to our target to

Callers 15

DestBinToAddrFunction · 0.45
StrengthenFunction · 0.45
RNGStateClass · 0.45
CheckUserAuthorizedFunction · 0.45
InitRPCAuthenticationFunction · 0.45
operator()Method · 0.45
ComputeResponseFunction · 0.45
RelayAddressMethod · 0.45
BIP32HashFunction · 0.45
SHA256Uint256Function · 0.45
TaggedHashFunction · 0.45
SetSeedMethod · 0.45

Calls 2

ClearShrinkFunction · 0.85
SetNullMethod · 0.45

Tested by

no test coverage detected