Skip to content

Commit dcdc618

Browse files
committed
Add get_point() query (for doubles perf simulation).
1 parent a5adf33 commit dcdc618

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

include/bitcoin/database/impl/query/objects.ipp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,17 @@ typename CLASS::input::cptr CLASS::get_input(
241241
return ptr;
242242
}
243243

244+
TEMPLATE
245+
typename CLASS::point CLASS::get_point(
246+
const point_link& link) const NOEXCEPT
247+
{
248+
table::point::record point{};
249+
if (!store_.point.get(link, point))
250+
return {};
251+
252+
return { point.hash, point.index };
253+
}
254+
244255
TEMPLATE
245256
typename CLASS::inputs_ptr CLASS::get_spenders(
246257
const output_link& link) const NOEXCEPT

include/bitcoin/database/query.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ class query
344344
uint32_t input_index) const NOEXCEPT;
345345
output::cptr get_output(const tx_link& link,
346346
uint32_t output_index) const NOEXCEPT;
347+
point get_point(const point_link& link) const NOEXCEPT;
347348
inputs_ptr get_spenders(const tx_link& link,
348349
uint32_t output_index) const NOEXCEPT;
349350

0 commit comments

Comments
 (0)