diff --git a/data/block/blockV2.go b/data/block/blockV2.go index 727c296d..2f688147 100644 --- a/data/block/blockV2.go +++ b/data/block/blockV2.go @@ -679,5 +679,7 @@ func (hv2 *HeaderV2) SetPreviousProof(proof data.HeaderProofHandler) { HeaderEpoch: proof.GetHeaderEpoch(), HeaderNonce: proof.GetHeaderNonce(), HeaderShardId: proof.GetHeaderShardId(), + HeaderRound: proof.GetHeaderRound(), + IsStartOfEpoch: proof.GetIsStartOfEpoch(), } } diff --git a/data/block/metaBlock.go b/data/block/metaBlock.go index 86a02293..ed7531b2 100644 --- a/data/block/metaBlock.go +++ b/data/block/metaBlock.go @@ -582,5 +582,6 @@ func (m *MetaBlock) SetPreviousProof(proof data.HeaderProofHandler) { HeaderNonce: proof.GetHeaderNonce(), HeaderShardId: proof.GetHeaderShardId(), HeaderRound: proof.GetHeaderRound(), + IsStartOfEpoch: proof.GetIsStartOfEpoch(), } } diff --git a/data/block/metaBlock_test.go b/data/block/metaBlock_test.go index f362bfa6..7bf32edf 100644 --- a/data/block/metaBlock_test.go +++ b/data/block/metaBlock_test.go @@ -418,6 +418,7 @@ func TestMetaBlock2_GetPreviousProof(t *testing.T) { HeaderNonce: 234, HeaderShardId: 0, HeaderRound: 345, + IsStartOfEpoch: true, } metaBlock.SetPreviousProof(previousProof) @@ -430,4 +431,5 @@ func TestMetaBlock2_GetPreviousProof(t *testing.T) { require.Equal(t, previousProof.HeaderNonce, proof.GetHeaderNonce()) require.Equal(t, previousProof.HeaderShardId, proof.GetHeaderShardId()) require.Equal(t, previousProof.HeaderRound, proof.GetHeaderRound()) + require.Equal(t, previousProof.IsStartOfEpoch, proof.GetIsStartOfEpoch()) } diff --git a/data/block/shardDataHandler.go b/data/block/shardDataHandler.go index 8ff670dc..0ccdad0f 100644 --- a/data/block/shardDataHandler.go +++ b/data/block/shardDataHandler.go @@ -227,6 +227,7 @@ func (sd *ShardData) SetPreviousProof(proof data.HeaderProofHandler) error { HeaderNonce: proof.GetHeaderNonce(), HeaderShardId: proof.GetHeaderShardId(), HeaderRound: proof.GetHeaderRound(), + IsStartOfEpoch: proof.GetIsStartOfEpoch(), } return nil