-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: bitcoin#25073, #25527, #25704, #25830, #26395, #26409 (kernel 4) #7630
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
base: develop
Are you sure you want to change the base?
Changes from all commits
68688dc
ff828ed
1568748
134a6d9
354534e
08cc7da
ffa3193
02f26d4
fdc2261
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,10 +5,18 @@ | |||||||
| #ifndef BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H | ||||||||
| #define BITCOIN_KERNEL_CHAINSTATEMANAGER_OPTS_H | ||||||||
|
|
||||||||
| #include <arith_uint256.h> | ||||||||
| #include <uint256.h> | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Blocking: Include the time utilities before using the chrono literal This header now uses the
Suggested change
source: ['codex'] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved in this update — Include the time utilities before using the chrono literal no longer present. Auto-resolved by the review system based on the latest commit diff. If you believe this was closed in error, reopen the thread. |
||||||||
| #include <util/time.h> | ||||||||
|
|
||||||||
| #include <cstdint> | ||||||||
| #include <optional> | ||||||||
|
|
||||||||
| class CChainParams; | ||||||||
|
|
||||||||
| static constexpr bool DEFAULT_CHECKPOINTS_ENABLED{true}; | ||||||||
| static constexpr auto DEFAULT_MAX_TIP_AGE{6h}; // ~144 blocks behind -> 2 x fork detection time, was 24h in bitcoin | ||||||||
|
|
||||||||
| namespace kernel { | ||||||||
|
|
||||||||
| /** | ||||||||
|
|
@@ -18,6 +26,14 @@ namespace kernel { | |||||||
| */ | ||||||||
| struct ChainstateManagerOpts { | ||||||||
| const CChainParams& chainparams; | ||||||||
| std::optional<bool> check_block_index{}; | ||||||||
| bool checkpoints_enabled{DEFAULT_CHECKPOINTS_ENABLED}; | ||||||||
| //! If set, it will override the minimum work we will assume exists on some valid chain. | ||||||||
| std::optional<arith_uint256> minimum_chain_work{}; | ||||||||
| //! If set, it will override the block hash whose ancestors we will assume to have valid scripts without checking them. | ||||||||
| std::optional<uint256> assumed_valid_block{}; | ||||||||
| //! If the tip is older than this, the node is considered to be in initial block download. | ||||||||
| std::chrono::seconds max_tip_age{DEFAULT_MAX_TIP_AGE}; | ||||||||
| }; | ||||||||
|
|
||||||||
| } // namespace kernel | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Copyright (c) 2022 The Bitcoin Core developers | ||
| // Distributed under the MIT software license, see the accompanying | ||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
|
||
| #ifndef BITCOIN_KERNEL_VALIDATION_CACHE_SIZES_H | ||
| #define BITCOIN_KERNEL_VALIDATION_CACHE_SIZES_H | ||
|
|
||
| #include <script/sigcache.h> | ||
|
|
||
| #include <cstddef> | ||
| #include <limits> | ||
|
|
||
| namespace kernel { | ||
| struct ValidationCacheSizes { | ||
| size_t signature_cache_bytes{DEFAULT_MAX_SIG_CACHE_BYTES / 2}; | ||
| size_t script_execution_cache_bytes{DEFAULT_MAX_SIG_CACHE_BYTES / 2}; | ||
| }; | ||
| } | ||
|
|
||
| #endif // BITCOIN_KERNEL_VALIDATION_CACHE_SIZES_H |
Uh oh!
There was an error while loading. Please reload this page.