aboutsummaryrefslogtreecommitdiffstats
path: root/core/lattice-data_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/lattice-data_test.go')
-rw-r--r--core/lattice-data_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/lattice-data_test.go b/core/lattice-data_test.go
index 263474c..64767e1 100644
--- a/core/lattice-data_test.go
+++ b/core/lattice-data_test.go
@@ -577,6 +577,18 @@ func (s *LatticeDataTestSuite) TestNextPosition() {
s.Equal(data.nextPosition(0), types.Position{ChainID: 0, Height: 0})
}
+func (s *LatticeDataTestSuite) TestPrepareEmptyBlock() {
+ data, _ := s.genTestCase1()
+ b := &types.Block{
+ Position: types.Position{
+ ChainID: 0,
+ },
+ }
+ data.prepareEmptyBlock(b)
+ s.True(b.IsEmpty())
+ s.Equal(uint64(4), b.Position.Height)
+}
+
func (s *LatticeDataTestSuite) TestNumChainsChange() {
// This test case verify the behavior when NumChains
// changes. We only reply on methods of latticeData