|
@ -64,14 +64,17 @@ type mockBlockStore struct { |
|
|
blocks map[int64]*types.Block |
|
|
blocks map[int64]*types.Block |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//nolint:unused
|
|
|
func (ml *mockBlockStore) Height() int64 { |
|
|
func (ml *mockBlockStore) Height() int64 { |
|
|
return int64(len(ml.blocks)) |
|
|
return int64(len(ml.blocks)) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//nolint:unused
|
|
|
func (ml *mockBlockStore) LoadBlock(height int64) *types.Block { |
|
|
func (ml *mockBlockStore) LoadBlock(height int64) *types.Block { |
|
|
return ml.blocks[height] |
|
|
return ml.blocks[height] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//nolint:unused
|
|
|
func (ml *mockBlockStore) SaveBlock(block *types.Block, part *types.PartSet, commit *types.Commit) { |
|
|
func (ml *mockBlockStore) SaveBlock(block *types.Block, part *types.PartSet, commit *types.Commit) { |
|
|
ml.blocks[block.Height] = block |
|
|
ml.blocks[block.Height] = block |
|
|
} |
|
|
} |
|
|