Skip to content

Commit

Permalink
Implement suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
greymistcube committed Oct 4, 2023
1 parent c3fbb4b commit f1a3919
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public IAccountState GetAccountState(BlockHash? offset)
}

public IAccountState GetAccountState(HashDigest<SHA256>? hash)
=> throw new NotImplementedException();
=> _source.GetAccountState(hash);
}

private sealed class LocalCacheAccountState : IAccountState
Expand Down
5 changes: 1 addition & 4 deletions NineChronicles.Headless.Tests/Common/MockState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ private MockState(

public ValidatorSet ValidatorSet => _validatorSet;

public ITrie Trie
{
get => new MerkleTrie(new MemoryKeyValueStore());
}
public ITrie Trie => throw new NotSupportedException();

public IValue? GetState(Address address) => _states.TryGetValue(address, out IValue? value)
? value
Expand Down
2 changes: 1 addition & 1 deletion NineChronicles.Headless/GraphTypes/StandaloneQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public StandaloneQuery(StandaloneContext standaloneContext, IConfiguration confi
var recipient = context.GetArgument<Address?>("recipient");

IEnumerable<Transaction> blockTxs = digest.TxIds
.Select(b => new TxId(b.ToBuilder().ToArray()))
.Select(bytes => new TxId(bytes))
.Select(store.GetTransaction);

var filtered = blockTxs
Expand Down

0 comments on commit f1a3919

Please sign in to comment.