예제 #1
0
 public ProofModuleFactory(
     IDbProvider dbProvider,
     IBlockTree blockTree,
     ITrieStore trieStore,
     IBlockPreprocessorStep recoveryStep,
     IReceiptFinder receiptFinder,
     ISpecProvider specProvider,
     ILogManager logManager)
 {
     _logManager    = logManager ?? throw new ArgumentNullException(nameof(logManager));
     _recoveryStep  = recoveryStep ?? throw new ArgumentNullException(nameof(recoveryStep));
     _receiptFinder = receiptFinder ?? throw new ArgumentNullException(nameof(receiptFinder));
     _specProvider  = specProvider ?? throw new ArgumentNullException(nameof(specProvider));
     _dbProvider    = dbProvider.AsReadOnly(false);
     _blockTree     = blockTree.AsReadOnly();
     _trieStore     = trieStore.AsReadOnly();
 }
예제 #2
0
 public static IReadOnlyTrieStore AsReadOnly(this ITrieStore trieStore, IKeyValueStore?readOnlyStore = null) =>
 trieStore.AsReadOnly(readOnlyStore);