Skip to content

Commit

Permalink
Revert iterator referenced key_ member.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jun 11, 2024
1 parent dcef21c commit 069301c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions include/bitcoin/database/impl/query/archive.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ inline bool CLASS::is_malleated64(const block& block) const NOEXCEPT
if (!block.is_malleable64())
return false;

// Pass l-value to iterator.
// block.get_hash() assumes cached or is not thread safe.
const auto link = to_header(block.get_hash());
auto it = store_.txs.it(link);
auto it = store_.txs.it(to_header(block.get_hash()));
if (!it)
return false;

Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/database/primitives/iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class iterator
const memory_ptr memory_;

// This is thread safe.
const Key& key_;
const Key key_;

// This is not thread safe.
Link link_;
Expand Down

0 comments on commit 069301c

Please sign in to comment.