Skip to content

Commit

Permalink
Fixup: Always set cache synchronizer to f if not already set
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRubin committed Dec 17, 2022
1 parent 02df478 commit ee7dda5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/script/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,11 @@ void PrecomputedTransactionData::Init(const T& txTo, std::vector<CTxOut>&& spent
{
// Do not allow overriding a sync function if one is already set
if (m_bip119_cache_synchronizer) assert(f == nullptr);
// No need to check if f is nullptr, since we'll patch in a single threaded
// cache filler later. (previous line guarantees m_bip119_cache_synchronizer
// is known to be nullptr here)
else m_bip119_cache_synchronizer = f;

assert(!m_spent_outputs_ready);

m_spent_outputs = std::move(spent_outputs);
Expand Down

0 comments on commit ee7dda5

Please sign in to comment.