While watching logs of #288 I see we have this exceptions from time to time:
2018-12-15 18:15:06.0672||28||TRACE||Stratis.FederatedPeg.Features.FederationGateway.SourceChain.DepositExtractor.ExtractDepositsFromBlock||(block:<NULL>,blockHeight:203)||||<GetMaturedDepositsAsync>d__6.MoveNext => DepositExtractor.ExtractBlockDeposits => DepositExtractor.ExtractDepositsFromBlock
2018-12-15 18:15:06.0672||28||TRACE||Stratis.FederatedPeg.Features.FederationGateway.SourceChain.DepositExtractor.ExtractDepositsFromBlock||(-)$exception:System.NullReferenceException: Object reference not set to an instance of an object.-> at Stratis.FederatedPeg.Features.FederationGateway.SourceChain.DepositExtractor.ExtractDepositsFromBlock(Block block, Int32 blockHeight)||||<GetMaturedDepositsAsync>d__6.MoveNext => DepositExtractor.ExtractBlockDeposits => DepositExtractor.ExtractDepositsFromBlock
we are passing null to ExtractDepositsFromBlock
the only part of code that call this method is :
|
IReadOnlyList<IDeposit> deposits = |
|
this.ExtractDepositsFromBlock(newlyMaturedBlock.Block, newlyMaturedBlock.ChainedHeader.Height); |
of course guarding for null on newlyMaturedBlock.Block will fix this error but I don't know if this is just a symptom of a more serious thing: is it fine to have a newlyMaturedBlock.Block that's null?
While watching logs of #288 I see we have this exceptions from time to time:
we are passing null to
ExtractDepositsFromBlockthe only part of code that call this method is :
FederatedSidechains/src/Stratis.FederatedPeg.Features.FederationGateway/SourceChain/DepositExtractor.cs
Lines 88 to 89 in 208571a
of course guarding for null on newlyMaturedBlock.Block will fix this error but I don't know if this is just a symptom of a more serious thing: is it fine to have a newlyMaturedBlock.Block that's null?