-
Notifications
You must be signed in to change notification settings - Fork 1
Add BlockHeader API #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
891030ac8b Merge bitcoin/bitcoin#33822: kernel: Add block header support and validation 0871e104a2 Merge bitcoin/bitcoin#34242: Prepare string and net utils for future HTTP operations 1b079becf1 Merge bitcoin/bitcoin#34317: fuzz: Exclude too expensive inputs in descriptor_parse targets cdb42a8df8 Merge bitcoin/bitcoin#34380: test: Fix P2PK script test 7b48b09b7f Merge bitcoin/bitcoin#34376: bench/test: clarify merkle bench and witness test intent fab2f3df4b fuzz: Exclude too expensive inputs in descriptor_parse targets 1911db8c6d string: add LineReader ee62405cce time: implement and test RFC1123 timestamp string eea38787b9 string: add AsciiCaseInsensitive{KeyEqual, Hash} for unordered map 1d8cb78d5b Merge bitcoin/bitcoin#34309: guix: stop passing depends sources to codesigning 4e300df712 string: add `base` argument for ToIntegral to operate on hexadecimal 0b0d9125c1 Modernize GetBindAddress() 7041648ee5 Merge bitcoin/bitcoin#34375: doc: mempool: fix `removeUnchecked` incorrect comment 9a9d797ef6 kernel: Add support for block headers 1137debb85 doc: mempool: fix `removeUnchecked` incorrect comment c9ce1c7c4a test: Fix P2PK script test 691dc830c6 Merge bitcoin/bitcoin#34377: test: Rename wallet in restore attempt in wallet_assumeutxo d7fd8c6952 Merge bitcoin/bitcoin#34090: net: Fix `-Wmissing-braces` 1fbbdd20cd Merge bitcoin/bitcoin#34355: doc: Fix wrong code in WITH_LOCK doxygen comment 9016858282 Merge bitcoin/bitcoin#34297: p2p: add validation checks for initial self-announcement e1dc4afeeb test: Rename wallet name in restore attempt in wallet_assumeutxo 8b9d30e3fa bench/test: clarify merkle bench and witness test intent 5715748333 Merge bitcoin/bitcoin#34366: test: switch order of error code and message check 2a1234001c Merge bitcoin/bitcoin#34269: wallet: disallow creating new or restoring to an unnamed (default) wallet 3ea2b6fe18 Merge bitcoin/bitcoin#34369: test: Scale NetworkThread close timeout with timeout_factor fab055c907 test: Scale NetworkThread close timeout with timeout_factor e324925d19 Merge bitcoin/bitcoin#34363: Update libmultiprocess subtree to avoid occasional rpc_misc.py timeout fa267551c4 Merge bitcoin/bitcoin#34353: refactor: Use std::bind_front over std::bind b851ff6cae kernel: Add Handle/View pattern for BlockValidationState fa61fadad1 doc: Fix wrong code in WITH_LOCK doxygen comment 52096de212 Merge bitcoin/bitcoin#34032: util: Add some more Unexpected and Expected methods 0aba464ce7 test: switch order of error code and message check 8c07800b19 Merge bitcoin/bitcoin#32497: merkle: pre‑reserve leaves to prevent reallocs with odd vtx count a365c9fe1f Merge bitcoin/bitcoin#33738: log: avoid collecting `GetSerializeSize` data when compact block logging is disabled bc3c4cd8b2 Merge bitcoin/bitcoin#32724: Musig2 tests f7e88e298a Merge bitcoin/bitcoin#32471: wallet/rpc: fix listdescriptors RPC fails to return descriptors with private key information when wallet contains descriptors missing any key 7f5ebef56a Merge bitcoin/bitcoin#34302: fuzz: Restore SendMessages coverage in process_message(s) fuzz targets a6e8cd306e Merge bitcoin/bitcoin#34310: iwyu: Add missed line to IWYU patch f4413706f9 Merge bitcoin/bitcoin#34344: ci: update GitHub Actions versions faa18dceba refactor: Use std::bind_front over std::bind c84c752506 Merge bitcoin/bitcoin#34319: Drop some `IWYU pragma: export` and document IWYU usage 38f951f828 Merge bitcoin/bitcoin#34308: doc: Document IWYU workaround ab80588f52 Merge bitcoin/bitcoin#34345: clang-format: use AngleBracket for main includes 977be171f2 Merge bitcoin/bitcoin#34188: test: Add multiple transactions and error handling tests for getreceivedbyaddress 347840164f Merge bitcoin/bitcoin#32143: Fix 11-year-old mis-categorized error code in OP_IF evaluation 969c840db5 log,blocks: avoid `ComputeTotalSize` and `GetHash` work when logging is disabled babfda332b log,net: avoid `ComputeTotalSize` when logging is disabled 1658b8f82b refactor: rename `CTransaction::GetTotalSize` to signal that it's not cached 75b704df9d wallettool: Disallow creating new unnamed wallets 5875a9c502 wallet: disallow unnamed wallets in createwallet and restorewallet 0dafc0d83c clang-format: use AngleBracket for main includes 03f363d378 doc: Document IWYU workaround d938947b3a doc: Add "Using IWYU" to Developer Notes e1a90bcecc iwyu: Do not export `crypto/hex_base.h` header 19a2edde50 iwyu: Do not export C++ headers in most cases 9482f00df0 chore: Update outdated GitHub Actions versions 898e8d3a2d Merge bitcoin/bitcoin#34296: refactor: [move-only] Merge core_io module, remove from libkernel faf07bd1ab doc: Fix typo found by LLM faf66673ac refactor: [move-only] Merge core_io module fa6947f491 kernel: Remove unused core_read.cpp from kernel 5e49f5d63c Merge bitcoin/bitcoin#33779: ci, iwyu: Fix warnings in `src/kernel` and treat them as errors c57fbbe99d Merge bitcoin/bitcoin#31650: refactor: Avoid copies by using const references or by move-construction d45ec3fba9 test: Add getreceivedbyaddress coverage to wallet_listreceivedby 22bde74d1d Merge bitcoin-core/gui#924: Show an error message if the restored wallet name is empty 81bf4209e9 Merge bitcoin/bitcoin#34318: contrib: Revert "verify-commits sha1 exceptions" a5a8c4139c ci, iwyu: Fix warnings in `src/kernel` and treat them as errors fa38ffac6f contrib: [refactor] Use shorter read_text from pathlib fab8bc0308 contrib: Revert "verify-commits sha1 exceptions" de509c6df9 iwyu: Add missed line to IWYU patch faa59b3679 util: Add Expected::swap() fabb47e4e3 util: Implement Expected::operator*()&& d94d7b1a4b guix: stop passing depends sources to codesigning 0ffb20dee1 Merge bitcoin/bitcoin#34282: qa: Fix Windows logging bug fab9721430 util: Implement Expected::value()&& and Expected::error()&& fac4800959 util: Add Expected<void, E> specialization fa6575d6c2 util: Make Expected::value() throw 697bc7f6a2 Merge bitcoin/bitcoin#34300: test: use ephemeral ports in p2p_private_broadcast.py 37cb209277 Merge bitcoin/bitcoin#34238: wallet: remove erroneous-on-reorg Assume() fabf8d1c5b fuzz: Restore SendMessages coverage in process_message(s) fuzz targets fac7fed397 refactor: Use std::reference_wrapper<AddrMan> in Connman d08c1b3ed9 Merge bitcoin/bitcoin#34288: fuzz: Exclude too expensive inputs in miniscript_string target 6a8dbf9b93 p2p: add validation check for initial self-announcement baa554f708 Merge bitcoin/bitcoin#34259: Find minimal chunks in SFL 3e340672ec test: use ephemeral ports in p2p_private_broadcast.py 9d2b8fddad Merge bitcoin/bitcoin#34210: bench: Remove -priority-level= option ae3b5a99f8 Merge bitcoin/bitcoin#34186: test: use dynamic port allocation in proxy tests f4364cedb3 Merge bitcoin/bitcoin#33728: test: Add bitcoin-chainstate test for assumeutxo functionality 80c4c2df3f Merge bitcoin/bitcoin#34146: p2p: send first addr self-announcement in separate message 🎄 fa64d8424b refactor: Enforce readability-avoid-const-params-in-decls faf0c2d942 refactor: Avoid copies by using const references or by move-construction cd0959ce9b Merge bitcoin/bitcoin#34185: test: fix `feature_pruning` when built without wallet b0b65336e7 Merge bitcoin/bitcoin#32740: refactor: Header sync optimisations & simplifications fac70ea8b5 fuzz: Exclude too expensive inputs in miniscript_string target fa90786478 iwyu: Fix includes for test/fuzz/util/descriptor module c0219f6bea Merge bitcoin/bitcoin#34285: ci: Install `pyzmq` for functional tests on Windows f62568c97c ci: Install `pyzmq` for functional tests on Windows 2d380aee43 Merge bitcoin/bitcoin#34243: doc: validation: fix `PackageMempoolChecks` incorrect comment db6e576710 Merge bitcoin/bitcoin#34279: test: Fail on self-check warnings in test_runner.py c447eea43d Merge bitcoin/bitcoin#34145: test: Add unit test for OP_NUMEQUALVERIFY 979d41bfab qa: Fix Windows logging bug 28f70c571b Merge bitcoin/bitcoin#34240: ci: Run feature_unsupported_utxo_db.py on Windows fa2959e16d test: Fail on self-check warnings in test_runner.py ac76d94117 Merge bitcoin/bitcoin#34109: refactor: Use uint64_t over size_t for serialize corruption check in fees.dat fa5032f0e4 ci: Run feature_unsupported_utxo_db.py on Windows 57350c5352 Merge bitcoin/bitcoin#34272: psbt: Fix `PSBTInputSignedAndVerified` bounds `assert` 88a7294356 Merge bitcoin/bitcoin#34260: contrib: Remove unused functions 8e8d8f29a8 Merge bitcoin/bitcoin#33775: guix: use GCC 14.3.0 over 13.3.0 d20037893a Merge bitcoin/bitcoin#34244: test: Prevent loop from running out of utxos in bip68 test 4aa80c3b5e Merge bitcoin/bitcoin#34230: fuzz: Reject too large descriptor leaf sizes in scriptpubkeyman target 72e0999ddb Merge bitcoin/bitcoin#34099: test: Improve code coverage for pubkey checks 377c6dbc3c Merge bitcoin/bitcoin#34224: init: Return EXIT_SUCCESS on interrupt c094a966d6 Merge bitcoin/bitcoin#34246: verify-commits: Allow specific commits to allow sha1 c352d3c51c Merge bitcoin/bitcoin#34168: qa: Require `--exclude` for each excluded test d30ad4a912 wallet, rpc: Use HandleWalletError in createwallet 7fc465ece8 doc: fix incorrect description of `PackageMempoolChecks` 62557c9529 Merge bitcoin/bitcoin#33819: mining: getCoinbase() returns struct instead of raw tx 73d0fe62d3 Merge commit '7562e2aeed95b0dc627e8e3a849941992f0189bb' into pr/subtree-7 7562e2aeed Squashed 'src/ipc/libmultiprocess/' changes from a4f92969649..1fc65008f7d 2f5b1c5f80 psbt: Fix `PSBTInputSignedAndVerified` bounds `assert` fa3df52712 bench: Require semicolon after BENCHMARK(foo) fa8938f08c bench: Remove incorrect __LINE__ in BENCHMARK macro fa51a28a94 scripted-diff: Remove priority_level from BENCHMARK macro fa790c3eea bench: Remove -priority-level= option dd904298c1 gui: Show an error message if the restored wallet name is empty 3c8d389a84 Merge bitcoin/bitcoin#34249: doc: archive v30.2 release notes 5e98a6a470 Merge bitcoin/bitcoin#34266: release note: cpfp carveout removed in 31.0 61726483e1 release note: cpfp carveout removed in 31.0 da56ef239b clusterlin: minimize chunks (feature) d09a19fd41 test: add coverage for issue 34206 a0ca851d26 Make GetBindAddress() callable from outside net.cpp 796f18e559 Merge bitcoin/bitcoin#29415: Broadcast own transactions only via short-lived Tor or I2P connections facaf56214 contrib: Remove unused functions abc6a3a4eb Merge bitcoin/bitcoin#34252: doc: add 433 (Pay to Anchor) to bips.md 44b12cdb11 doc: add 433 (Pay to Anchor) to bips.md f664860e52 doc: archive v30.2 release notes ce63d37ebe test: use dynamic port allocation to avoid test conflicts 8ac134be5e contrib: verify-commits sha1 exceptions ab41492c6b test: Prevent loop from running out of utxos in bip68 test aeaa67a9ea Merge bitcoin/bitcoin#33428: depends: Boost 1.90.0 1412b779ad refactor: execute `PackageMempoolChecks` during package rbf only 4c7cfd37ad wallet: remove erroneous-on-reorg Assume() 8fb5e5f41d test: check wallet rescan properly in feature_pruning 595504a432 Merge bitcoin/bitcoin#34236: Add sedited to trusted-keys 5c724f3b04 Merge bitcoin/bitcoin#34235: miniminer: stop assuming ancestor fees >= self fees 2d87afcf7d Merge bitcoin/bitcoin#34227: guix: Fix `osslsigncode` tests 7b17fb78fa Merge bitcoin/bitcoin#34226: wallet: test: Relative wallet failed migration cleanup eeaf28dbe0 wallet: test: Failed migration cleanup 997e7b4d7c init: Fix non-zero code on interrupt d1b227f3ad Add sedited to trusted-keys 6c3fb719d1 Merge bitcoin-core/gui#921: Remove deprecated "Starting Block" from Peer Detail 2cade5d5d1 [miniminer] stop assuming ancestor fees >= self fees fa8d56f9f0 fuzz: Reject too large descriptor leaf sizes in scriptpubkeyman target fabac1b395 fuzz: Reject some more "expensive" descriptors in the scriptpubkeyman target 194114daf3 guix: Fix `osslsigncode` tests 333333356f fuzz: [refactor] Use std::span over FuzzBufferType in descriptor utils 8d5700ab0f Merge bitcoin/bitcoin#34221: test: migration, avoid backup name mismatch in default_wallet_failure cbf0bd35bb test: migration, avoid backup name mismatch in default_wallet_failure cd6e4c9235 Merge bitcoin/bitcoin#34215: wallettool: fix unnamed createfromdump failure walletsdir deletion 90d651a81f Merge bitcoin/bitcoin#34156: wallet: fix unnamed legacy wallet migration failure 9c7e4771b1 test: Test listdescs with priv works even with missing priv keys ed945a6854 walletrpc: reject listdes with priv key on w-only wallets 9e5e9824f1 descriptor: ToPrivateString() pass if at least 1 priv key exists 5c4db25b61 descriptor: refactor ToPrivateString for providers 2dc74e3f4e wallet/migration: use HavePrivateKeys in place of ToPrivateString e842eb90bb descriptors: add HavePrivateKeys() f78f6f1dc8 wallettool: do not use fs::remove_all in createfromdump cleanup a9daa6dbd3 Merge bitcoin/bitcoin#34135: rpc: [wallet] Use unsigned type for tx version in sendall a3c71c7201 [test] Add BIP 328 test vectors for Musig2 b7c34d08dd test: coverage for migration failure when last sync is beyond prune height 82caa8193a wallet: migration, fix watch-only and solvables wallets names d70b159c42 wallet: improve post-migration logging f011e0f068 test: restorewallet, coverage for existing dirs, unnamed wallet and prune failure 36093bde63 test: add coverage for unnamed wallet migration failure f4c7e28e80 wallet: fix unnamed wallet migration failure 4ed0693a3f wallet: RestoreWallet failure, erase only what was created c60f9cb66e Merge bitcoin/bitcoin#34085: cluster mempool: exploit SFL properties in txgraph 2a746500fa ci: migrate some jobs to Debian Trixie, use GCC 14 fb0e6edfe8 guix: Apply SSA generation patch to maintain determinism 34909799fe guix: use GCC 14.3.0 over 13.3.0 47be9122a7 guix: disable gprofng in GCC ea29329eb7 guix: build GCC with --enable-host-bind-now 6f54e267d0 guix: disable libquadmath in GCC 7735901ed2 guix: disable building libgomp in GCC 114901c065 Merge bitcoin/bitcoin#34203: doc: p2p: replace last remaining "command" terminology with "message type" d7cbdfa090 Merge bitcoin/bitcoin#34204: test: fix intermittent failure in p2p_addr_selfannouncement 301d9eea66 qt: Remove "Starting Block" from Peer Detail. Following Deprecation in `bitcoin#34197` 0ad4376a49 Merge bitcoin/bitcoin#33142: test: Run bench sanity checks in parallel with functional tests c267b3a2c6 Merge bitcoin/bitcoin#34197: rpc, net: deprecate `startingheight` field of `getpeerinfo` RPC d6a6afd955 Merge bitcoin/bitcoin#34010: psbt: detect invalid MuSig2 pubkeys in deserialization 5b7bf47f9b doc: p2p: replace last remaining "command" terminology with "message type" 1808b5aaf7 clusterlin: remove unused FixLinearization (cleanup) 34a77138b7 txgraph: permit non-topological clusters to defer fixing (optimization) 3380e0cbb5 txgraph: use PostLinearize less prior to linearizing 62dd88624a txgraph: drop NEEDS_SPLIT_ACCEPTABLE (simplification) 01ffcf464a clusterlin: support fixing linearizations (feature) 755f0900a2 Merge bitcoin/bitcoin#34136: test: Allow mempool_updatefromblock.py to run on 32-bit 5805a8b540 psbt: detect invalid MuSig2 pubkeys in deserialization 792e2edf57 p2p: first addr self-announcement in separate msg 31852057ea test: fix intermittent failure in p2p_addr_selfannouncement 48f57bb35b mining: add new getCoinbaseTx() returning a struct bd4f4782f2 Merge bitcoin/bitcoin#34154: test: Enable ruff E713 lint 4ce3f4a265 rpc, net: deprecate `startingheight` field of `getpeerinfo` RPC ab233255d4 Merge bitcoin/bitcoin#33866: refactor: Let CCoinsViewCache::BatchWrite return void 2628de7479 Merge bitcoin/bitcoin#33135: wallet: warn against accidental unsafe older() import 9b57c8d2bd test: fix feature_pruning when built without wallet c631553732 Merge bitcoin/bitcoin#34191: doc: archive release notes for v30.1 bd730cb0a1 doc: archive release notes for v30.1 c5825d4b7f qa: Require `--exclude` for each excluded test 6ed2cf5184 Merge bitcoin/bitcoin#34169: fuzz: change fuzz runner test_runner.py to be cwd independent fb49d62d8f Merge bitcoin/bitcoin#34177: policy/refactor: remove constant parameter from `IsWellFormedPackage` fa65bc0e79 test: Run bench sanity checks in parallel with functional tests fa9fdbce79 test: Pass bench exe into test framework utils adbb4b3208 Merge bitcoin/bitcoin#34174: doc: update copyright year to 2026 891aed2f75 Merge bitcoin/bitcoin#34172: Fix intermittent issue in p2p_1p1c_network.py 7590a72a5e Merge bitcoin/bitcoin#34182: doc: Update OpenBSD Build Guide a50d7a7929 Merge bitcoin/bitcoin#34183: doc: fix double-word typos in comments 2bff9ebeff Merge bitcoin/bitcoin#34102: depends: capnp 1.3.0 08ed802bab doc: fix double-word typos in comments 84d8c52662 doc: Update OpenBSD Build Guide 77c9b3c08f change test_runner.py to be cwd independent by calling subprocess.run with cwd arg. 658d38106a policy: remove constant parameter from `IsWellFormedPackage` b23b901363 doc: update copyright year 95ef0fc5e7 test: ensure clean orphanage before continuing 25e84d3772 test: change low fee parents to 0-fee 2bcb3f6464 Merge bitcoin/bitcoin#34112: rpc: [mempool] Remove erroneous Univalue integral casts 7249bcc4f8 Merge bitcoin/bitcoin#34119: contrib: remove `copyright_header.py` 0f6a526f43 Merge bitcoin/bitcoin#34160: policy: Remove stale rationale paragraph 337b4a2369 Remove stale rationale paragraph 94ddc2dced Merge bitcoin/bitcoin#34113: refactor: [rpc] Remove confusing and brittle integral casts c575990651 Merge bitcoin/bitcoin#34147: scripted-diff: refactor: wallet: Delete duplicate IsCrypted() fab300b378 test: Enable ruff E713 lint 11ce5cf799 scripted-diff: refactor: wallet: Delete IsCrypted b762538756 test: Add unit test for SCRIPT_ERR_NUMEQUALVERIFY 3dd815f048 validation: pre-reserve leaves to prevent reallocs with odd vtx count 7fd47e0e56 bench: make `MerkleRoot` benchmark more representative fac5a1b10a test: Allow mempool_updatefromblock.py to run on 32-bit fafbc70d48 rpc: [wallet] Use unsigned type for tx version in sendall ba6315d2f6 contrib: remove copyright_header.py 3e4765ee10 scripted-diff: [doc] Unify stale copyright headers fa66e2d07a refactor: [rpc] Remove confusing and brittle integral casts fab1f4b800 rpc: [mempool] Remove erroneous Univalue integral casts d59b4cdb57 mining: rename getCoinbaseTx() to ..RawTx() fa1d17d56c refactor: Use uint64_t over size_t for serialize corruption check in fees.dat 7b5d256af4 test: Add bitcoin-chainstate test for assumeutxo functionality 2bc3265649 Fix `ChainstateManager::AddChainstate()` assertion crash 5f3d6bdb66 Add regtest support to bitcoin-chainstate tool 719158db5c depends: capnp 1.3.0 6bb66fcccb test: Improve code coverage for pubkey checks f46e3ec0f9 net: Fix `-Wmissing-braces` 8937221304 doc: add release notes for 29415 582016fa5f test: add unit test for the private broadcast storage e74d54e048 test: add functional test for private broadcast 818b780a05 rpc: use private broadcast from sendrawtransaction RPC if -privatebroadcast is ON eab595f9cf net_processing: retry private broadcast 37b79f9c39 net_processing: stop private broadcast of a transaction after round-trip 2de53eee74 net_processing: handle ConnectionType::PRIVATE_BROADCAST connections 30a9853ad3 net_processing: move a debug check in VERACK processing earlier d1092e5d48 net_processing: modernize PushNodeVersion() 9937a12a2f net_processing: move the debug log about receiving VERSION earlier a098f37b9e net_processing: reorder the code that handles the VERSION message 679ce3a0b8 net_processing: store transactions for private broadcast in PeerManager a3faa6f944 node: extend node::TxBroadcast with a 3rd option 95c051e210 net_processing: rename RelayTransaction() to better describe what it does bb49d26032 net: implement opening PRIVATE_BROADCAST connections 01dad4efe2 net: introduce a new connection type for private broadcast 94aaa5d31b init: introduce a new option to enable/disable private broadcast d6ee490e0a log: introduce a new category for private broadcast 6da6f503a6 refactor: Let CCoinsViewCache::BatchWrite return void f0a2183108 test: adjust `ComputeMerkleRoot` tests fa1de1103f util: Add Unexpected::error() faa109f8be test: refactor: Use BOOST_CHECK_EQUAL over BOOST_CHECK == fad4a9fe2b Set bugprone-unused-return-value.AllowCastToVoid ca4a844eed depends: Boost 1.90.0 76c092ff80 wallet: warn against accidental unsafe older() import 592157b759 test: move SEQUENCE_LOCKTIME flags to script de4242f474 refactor: Use reference for chain_start in HeadersSyncState e37555e540 refactor: Use initializer list in CompressedHeader 0488bdfefe refactor: Remove unused parameter in ReportHeadersPresync 256246a9fa refactor: Remove redundant parameter from CheckHeadersPoW ca0243e3a6 refactor: Remove useless CBlock::GetBlockHeader 4568652222 refactor: Use std::span in HasValidProofOfWork 4066bfe561 refactor: Compute work from headers without CBlockIndex 0bf6139e19 p2p: Avoid an IsAncestorOfBestHeaderOrTip call a7b581423e Fix 11-year-old mis-categorized error code in OP_IF evaluation git-subtree-dir: depend/bitcoin git-subtree-split: 891030ac8b9e3f91084a9c8e0d8d9a158a2bbf93
Introduces BlockHeader as a first-class type with getters (Hash, PrevHash, Timestamp, Bits, Version, Nonce) and extraction methods (Block.GetHeader, BlockTreeEntry.GetHeader). Refactors BlockValidationState to support ownership semantics with BlockValidationStateView for unowned access and adds BlockValidationError for detailed BlockHeader validation failures. Adds ChainstateManager.ProcessBlockHeader() for BlockHeader validation and headers-first sync support.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces
BlockHeaderas a first-class type with getters (Hash, PrevHash, Timestamp, Bits, Version, Nonce) and extraction methods (Block.GetHeader,BlockTreeEntry.GetHeader).Refactors
BlockValidationStateto support ownership semantics withBlockValidationStateViewfor unowned access and addsBlockValidationErrorfor detailed BlockHeader validation failures.Adds
ChainstateManager.ProcessBlockHeader()for BlockHeader validation and headers-first sync support.