Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions include/bitcoin/database/impl/query/archive_read.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ inline bool CLASS::is_confirmable(const header_link& link) const NOEXCEPT
return get_header_state(link) == error::block_confirmable;
}

TEMPLATE
inline bool CLASS::is_valid(const header_link& link) const NOEXCEPT
{
return get_header_state(link) == error::block_valid;
}

// Empty/null_hash implies fault, zero count implies unassociated.
// ----------------------------------------------------------------------------

Expand Down
8 changes: 8 additions & 0 deletions include/bitcoin/database/impl/query/validate.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ uint64_t CLASS::get_tx_fee(const tx_link& link) const NOEXCEPT
return tx && populate_without_metadata(*tx) ? tx->fee() : max_uint64;
}

TEMPLATE
inline bool CLASS::is_validated(const header_link& link) const NOEXCEPT
{
// Validated and not invalid (checkpoint/milestone shows false).
const auto state = get_header_state(link);
return state == error::block_valid || state == error::block_confirmable;
}

TEMPLATE
bool CLASS::is_block_validated(code& state, const header_link& link,
size_t height, size_t checkpoint) const NOEXCEPT
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/database/query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class query
inline bool is_milestone(const header_link& link) const NOEXCEPT;
inline bool is_associated(const header_link& link) const NOEXCEPT;
inline bool is_confirmable(const header_link& link) const NOEXCEPT;
inline bool is_valid(const header_link& link) const NOEXCEPT;
inline bool is_validated(const header_link& link) const NOEXCEPT;

/// Empty/null_hash implies fault, zero count implies unassociated.
hash_digest get_top_confirmed_hash() const NOEXCEPT;
Expand Down
Loading