Exemple #1
0
        public async Task TrustedStateCompleter()
        {
            StateCompleter <DumbAction> noComplete = StateCompleters <DumbAction> .Reject;

            // The chain with incomplete states
            var incompleteStateStore = new DefaultStore(null);

            (_, Address[] addresses, BlockChain <DumbAction> incompleteChain) =
Exemple #2
0
 internal static Func <BlockChain <T>, HashDigest <SHA256>, IValue> ToRawStateCompleter(
     StateCompleter <T> stateCompleter,
     Address address
     ) =>
 (blockChain, hash) => stateCompleter(blockChain, hash, address);
Exemple #3
0
 private IValue NullStateGetter <T>(
     Address address,
     HashDigest <SHA256>?hashDigest,
     StateCompleter <T> stateCompleter)
     where T : IAction, new() => null;
Exemple #4
0
 public IReadOnlyList <IValue?> GetStates(
     IReadOnlyList <Address> addresses,
     BlockHash offset,
     StateCompleter <T> stateCompleter
     ) =>
 new IValue?[addresses.Count];
Exemple #5
0
 internal static Func <BlockChain <T>, BlockHash, IReadOnlyList <IValue?> > ToRawStateCompleter(
     StateCompleter <T> stateCompleter,
     IReadOnlyList <Address> addresses
     ) =>
 (blockChain, hash) => stateCompleter(blockChain, hash, addresses);