File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,14 @@ typename CLASS::output::cptr CLASS::get_output(
304304 return out.output ;
305305}
306306
307+ TEMPLATE
308+ typename CLASS::point CLASS::get_spender (const point_link& link) const NOEXCEPT
309+ {
310+ const auto tx = to_spending_tx (link);
311+ const auto index = to_input_index (tx, link);
312+ return { get_tx_key (tx), index };
313+ }
314+
307315TEMPLATE
308316typename CLASS::inputs_ptr CLASS::get_spenders (
309317 const output_link& link, bool witness) const NOEXCEPT
Original file line number Diff line number Diff line change @@ -397,6 +397,7 @@ class query
397397 script::cptr get_output_script (const output_link& link) const NOEXCEPT;
398398 output::cptr get_output (const output_link& link) const NOEXCEPT;
399399 output::cptr get_output (const tx_link& link, uint32_t index) const NOEXCEPT;
400+ point get_spender (const point_link& link) const NOEXCEPT;
400401 inputs_ptr get_spenders (const output_link& link,
401402 bool witness) const NOEXCEPT;
402403
You can’t perform that action at this time.
0 commit comments