Skip to content

Commit

Permalink
Make header::proof(uint32_t) public.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Feb 14, 2024
1 parent ebca31f commit 1725d92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/bitcoin/system/chain/header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class BC_API header

typedef std::shared_ptr<const header> cptr;

static uint256_t proof(uint32_t bits) NOEXCEPT;
static constexpr size_t serialized_size() NOEXCEPT
{
return sizeof(version_)
Expand Down Expand Up @@ -136,7 +137,6 @@ class BC_API header

private:
static header from_data(reader& source) NOEXCEPT;
static uint256_t proof(uint32_t bits) NOEXCEPT;

// Header should be stored as shared (adds 16 bytes).
// copy: 4 * 32 + 2 * 256 + 1 = 81 bytes (vs. 16 when shared).
Expand Down
2 changes: 1 addition & 1 deletion src/chain/header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ hash_digest header::hash() const NOEXCEPT
return digest;
}

// static/private
// static
uint256_t header::proof(uint32_t bits) NOEXCEPT
{
auto target = compact::expand(bits);
Expand Down

0 comments on commit 1725d92

Please sign in to comment.