Skip to content

Commit 71bd5a8

Browse files
committed
Sort methods.
1 parent dd2beaa commit 71bd5a8

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
169181
TEMPLATE
170182
header_link CLASS::to_strong(const hash_digest& tx_hash) const NOEXCEPT
@@ -196,18 +208,6 @@ header_link CLASS::to_parent(const header_link& link) const NOEXCEPT
196208
return header.parent_fk;
197209
}
198210

199-
TEMPLATE
200-
header_link CLASS::to_block(const tx_link& key) const NOEXCEPT
201-
{
202-
// Required for confirmation processing.
203-
table::strong_tx::record strong{};
204-
if (!store_.strong_tx.find(key, strong) || !strong.positive())
205-
return {};
206-
207-
// Terminal implies not in strong block (reorganized).
208-
return strong.header_fk();
209-
}
210-
211211
// output to spenders (reverse navigation)
212212
// ----------------------------------------------------------------------------
213213

include/bitcoin/database/query.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ class query
287287
output_link to_prevout(const point_link& link) const NOEXCEPT;
288288

289289
/// block/tx to block (reverse navigation)
290+
header_link to_block(const tx_link& key) const NOEXCEPT;
290291
header_link to_strong(const hash_digest& tx_hash) const NOEXCEPT;
291292
header_link to_parent(const header_link& link) const NOEXCEPT;
292-
header_link to_block(const tx_link& key) const NOEXCEPT;
293293

294294
/// output to spenders (reverse navigation)
295295
point_links to_spenders(const point& prevout) const NOEXCEPT;

0 commit comments

Comments
 (0)