File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,6 @@ header_link CLASS::to_strong(const hash_digest& tx_hash) const NOEXCEPT
196196
197197 return {};
198198}
199-
200199TEMPLATE
201200header_link CLASS::to_parent (const header_link& link) const NOEXCEPT
202201{
@@ -208,6 +207,27 @@ header_link CLASS::to_parent(const header_link& link) const NOEXCEPT
208207 return header.parent_fk ;
209208}
210209
210+ // to confirmed objects (reverse navigation)
211+ // ----------------------------------------------------------------------------
212+
213+ TEMPLATE
214+ header_link CLASS::to_confirmed_block (
215+ const hash_digest& tx_hash) const NOEXCEPT
216+ {
217+ const auto block = to_strong (tx_hash);
218+ if (!is_confirmed_block (block))
219+ return {};
220+
221+ return block;
222+ }
223+
224+ TEMPLATE
225+ point_link CLASS::to_confirmed_spender (const point&) const NOEXCEPT
226+ {
227+ // TODO: implement.
228+ return {};
229+ }
230+
211231// output to spenders (reverse navigation)
212232// ----------------------------------------------------------------------------
213233
Original file line number Diff line number Diff line change @@ -291,6 +291,10 @@ class query
291291 header_link to_strong (const hash_digest& tx_hash) const NOEXCEPT;
292292 header_link to_parent (const header_link& link) const NOEXCEPT;
293293
294+ // / to confirmed objects (reverse navigation)
295+ header_link to_confirmed_block (const hash_digest& tx_hash) const NOEXCEPT;
296+ point_link to_confirmed_spender (const point& prevout) const NOEXCEPT;
297+
294298 // / output to spenders (reverse navigation)
295299 point_links to_spenders (const point& prevout) const NOEXCEPT;
296300 point_links to_spenders (const output_link& link) const NOEXCEPT;
You can’t perform that action at this time.
0 commit comments