Kagome
Polkadot Runtime Engine in C++17
polkadot_trie_factory_impl.cpp
Go to the documentation of this file.
1 
7 
8 namespace kagome::storage::trie {
9 
10  std::unique_ptr<PolkadotTrie> PolkadotTrieFactoryImpl::createEmpty(
12  return std::make_unique<PolkadotTrieImpl>(f);
13  }
14 
15  std::shared_ptr<PolkadotTrie> PolkadotTrieFactoryImpl::createFromRoot(
17  return std::make_shared<PolkadotTrieImpl>(std::move(root), std::move(f));
18  }
19 
20 } // namespace kagome::storage::trie
std::shared_ptr< TrieNode > NodePtr
std::unique_ptr< PolkadotTrie > createEmpty(PolkadotTrie::NodeRetrieveFunctor f) const override
std::function< outcome::result< NodePtr >(std::shared_ptr< OpaqueTrieNode > const &)> NodeRetrieveFunctor
std::shared_ptr< PolkadotTrie > createFromRoot(PolkadotTrie::NodePtr root, PolkadotTrie::NodeRetrieveFunctor f) const override