PrevUpHomeNext

Validations::withTrie

Use the trie for a calculation.

Synopsis
template<
    class F>
auto
withTrie(
    ScopedLock const& lock,
    F&& f);
Description

Accessing the trie through this helper ensures acquiring validations are checked and any stale validations are flushed from the trie.

Parameters

Name

Description

lock

Existing locked of mutex_

f

Invokable with signature (LedgerTrie<Ledger> &)

The invokable f is expected to be a simple transformation of its arguments and will be called with mutex_ under lock.


PrevUpHomeNext