ensure extensions on extended commit save

This commit is contained in:
William Banfield
2022-05-19 12:31:50 -04:00
parent 05d930f40a
commit 4e05b5f108
+3
View File
@@ -497,6 +497,9 @@ func (bs *BlockStore) SaveBlockWithExtendedCommit(block *types.Block, blockParts
if block == nil {
panic("BlockStore can only save a non-nil block")
}
if err := seenExtendedCommit.EnsureExtensions(); err != nil {
panic(fmt.Sprintf("saving block with extensions %w", err))
}
batch := bs.db.NewBatch()
if err := bs.saveBlockToBatch(batch, block, blockParts, seenExtendedCommit.ToCommit()); err != nil {
panic(err)