Closed earlbread closed 5 years ago
I guess this happens at the following code:
… because IStore.GetBlockStates()
method became able to return null
to represent an absence of states (i.e., incomplete states) since the patch #285. So if my hypotheses is valid we can reproduce this by trying to fork a chain filled by downloading pre-calculated states from a trusted peer.
Easily reproduced:
[Fact]
public void ForkChainWithIncompleteBlockStates()
{
(_, _, BlockChain<DumbAction> chain) = MakeIncompleteBlockStates();
BlockChain<DumbAction> forked = chain.Fork(chain[5].Hash);
Assert.Equal(chain.Take(6), forked);
}