File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,6 @@ inline bool CLASS::is_confirmable(const header_link& link) const NOEXCEPT
7777 return get_header_state (link) == error::block_confirmable;
7878}
7979
80- TEMPLATE
81- inline bool CLASS::is_valid (const header_link& link) const NOEXCEPT
82- {
83- return get_header_state (link) == error::block_valid;
84- }
85-
8680// Empty/null_hash implies fault, zero count implies unassociated.
8781// ----------------------------------------------------------------------------
8882
Original file line number Diff line number Diff line change @@ -161,6 +161,14 @@ uint64_t CLASS::get_tx_fee(const tx_link& link) const NOEXCEPT
161161 return tx && populate_without_metadata (*tx) ? tx->fee () : max_uint64;
162162}
163163
164+ TEMPLATE
165+ inline bool CLASS::is_validated (const header_link& link) const NOEXCEPT
166+ {
167+ // Validated and not invalid (checkpoint/milestone shows false).
168+ const auto state = get_header_state (link);
169+ return state == error::block_valid || state == error::block_confirmable;
170+ }
171+
164172TEMPLATE
165173bool CLASS::is_block_validated (code& state, const header_link& link,
166174 size_t height, size_t checkpoint) const NOEXCEPT
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ class query
328328 inline bool is_milestone (const header_link& link) const NOEXCEPT;
329329 inline bool is_associated (const header_link& link) const NOEXCEPT;
330330 inline bool is_confirmable (const header_link& link) const NOEXCEPT;
331- inline bool is_valid (const header_link& link) const NOEXCEPT;
331+ inline bool is_validated (const header_link& link) const NOEXCEPT;
332332
333333 // / Empty/null_hash implies fault, zero count implies unassociated.
334334 hash_digest get_top_confirmed_hash () const NOEXCEPT;
You can’t perform that action at this time.
0 commit comments