Skip to content

Commit

Permalink
Merge pull request #400 from evoskuil/master
Browse files Browse the repository at this point in the history
Fix test vector for system consideration of BIP30 flag.
  • Loading branch information
evoskuil authored Feb 18, 2024
2 parents 0f7a4f6 + 07f1d10 commit d4f9ad1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions include/bitcoin/database/query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,12 @@ class query
inline hash_digest get_point_key(const point_link& link) const NOEXCEPT;
inline hash_digest get_tx_key(const tx_link& link) const NOEXCEPT;

/// False implies not confirmed, false get_value implies error.
bool get_height(size_t& out, const header_link& link) const NOEXCEPT;
/// False implies not confirmed.
bool get_tx_height(size_t& out, const tx_link& link) const NOEXCEPT;
bool get_tx_position(size_t& out, const tx_link& link) const NOEXCEPT;

/// False implies fault.
bool get_height(size_t& out, const header_link& link) const NOEXCEPT;
bool get_value(uint64_t& out, const output_link& link) const NOEXCEPT;

inputs_ptr get_inputs(const tx_link& link) const NOEXCEPT;
Expand Down
6 changes: 3 additions & 3 deletions test/query/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(query_context__get_candidate_chain_state__genesis__expected
const system::settings system_settings{ system::chain::selection::mainnet };
const system::chain::context expected
{
131203u,
131211u,
test::genesis.header().timestamp(),
0u,
0u,
Expand Down Expand Up @@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(query_context__get_candidate_cchain_state__block1__expected
const system::settings system_settings{ system::chain::selection::mainnet };
const system::chain::context expected
{
131203u, // forks
131211u, // forks
test::block1.header().timestamp(), // timestamp
test::genesis.header().timestamp(), // mtp
1u, // height
Expand All @@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(query_context__get_candidate_cchain_state__block1__expected
const database::context context
{
expected.forks,
static_cast<uint32_t>(expected.height),
system::possible_narrow_cast<uint32_t>(expected.height),
expected.median_time_past
};

Expand Down

0 comments on commit d4f9ad1

Please sign in to comment.