@@ -165,6 +165,18 @@ output_link CLASS::to_prevout(const point_link& link) const NOEXCEPT
165165// block/tx to block (reverse navigation)
166166// ----------------------------------------------------------------------------
167167
168+ // Required for confirmation processing.
169+ TEMPLATE
170+ header_link CLASS::to_block (const tx_link& key) const NOEXCEPT
171+ {
172+ table::strong_tx::record strong{};
173+ if (!store_.strong_tx .find (key, strong) || !strong.positive ())
174+ return {};
175+
176+ // Terminal implies not in strong block (reorganized).
177+ return strong.header_fk ();
178+ }
179+
168180// Required for confirmation processing.
169181TEMPLATE
170182header_link CLASS::to_strong (const hash_digest& tx_hash) const NOEXCEPT
@@ -184,7 +196,6 @@ header_link CLASS::to_strong(const hash_digest& tx_hash) const NOEXCEPT
184196
185197 return {};
186198}
187-
188199TEMPLATE
189200header_link CLASS::to_parent (const header_link& link) const NOEXCEPT
190201{
@@ -196,16 +207,25 @@ header_link CLASS::to_parent(const header_link& link) const NOEXCEPT
196207 return header.parent_fk ;
197208}
198209
210+ // to confirmed objects (reverse navigation)
211+ // ----------------------------------------------------------------------------
212+
199213TEMPLATE
200- header_link CLASS::to_block (const tx_link& key) const NOEXCEPT
214+ header_link CLASS::to_confirmed_block (
215+ const hash_digest& tx_hash) const NOEXCEPT
201216{
202- // Required for confirmation processing.
203- table::strong_tx::record strong{};
204- if (!store_.strong_tx .find (key, strong) || !strong.positive ())
217+ const auto block = to_strong (tx_hash);
218+ if (!is_confirmed_block (block))
205219 return {};
206220
207- // Terminal implies not in strong block (reorganized).
208- return strong.header_fk ();
221+ return block;
222+ }
223+
224+ TEMPLATE
225+ point_link CLASS::to_confirmed_spender (const point&) const NOEXCEPT
226+ {
227+ // TODO: implement.
228+ return {};
209229}
210230
211231// output to spenders (reverse navigation)
0 commit comments