Use the trie for a calculation.
template< class F> auto withTrie( ScopedLock const& lock, F&& f);
Accessing the trie through this helper ensures acquiring validations are checked and any stale validations are flushed from the trie.
Name |
Description |
---|---|
|
Existing locked of mutex_ |
|
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.