@@ -3,6 +3,7 @@ package block
33import (
44 "encoding/hex"
55 "errors"
6+ "github.com/multiversx/mx-chain-core-go/data/api"
67 "math/big"
78 "testing"
89
@@ -258,13 +259,33 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
258259 TxCount : 120 ,
259260 },
260261 },
262+ PreviousHeaderProof : & dataBlock.HeaderProof {
263+ PubKeysBitmap : []byte ("bitmap" ),
264+ AggregatedSignature : []byte ("sig" ),
265+ HeaderHash : []byte ("hash" ),
266+ HeaderEpoch : 1 ,
267+ HeaderNonce : 3 ,
268+ HeaderShardId : 2 ,
269+ HeaderRound : 4 ,
270+ IsStartOfEpoch : true ,
271+ },
261272 }
262273
263274 headerBytes , _ := bp .marshalizer .Marshal (header )
264275 outportBlockWithHeader := & outport.OutportBlockWithHeader {
265276 Header : header ,
266277 OutportBlock : & outport.OutportBlock {
267278 BlockData : & outport.BlockData {
279+ HeaderProof : & dataBlock.HeaderProof {
280+ PubKeysBitmap : []byte ("bitmap1" ),
281+ AggregatedSignature : []byte ("sig1" ),
282+ HeaderHash : []byte ("hash1" ),
283+ HeaderEpoch : 2 ,
284+ HeaderNonce : 2 ,
285+ HeaderShardId : 2 ,
286+ HeaderRound : 2 ,
287+ IsStartOfEpoch : false ,
288+ },
268289 HeaderBytes : headerBytes ,
269290 HeaderHash : []byte ("hash" ),
270291 Body : & dataBlock.Body {
@@ -293,7 +314,7 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
293314 Proposer : 0 ,
294315 Validators : nil ,
295316 PubKeyBitmap : "" ,
296- Size : 898 ,
317+ Size : 1090 ,
297318 SizeTxs : 0 ,
298319 Timestamp : 0 ,
299320 StateRootHash : "" ,
@@ -331,6 +352,26 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
331352 TxsHashes : []string {},
332353 },
333354 },
355+ Proof : & api.HeaderProof {
356+ PubKeysBitmap : "6269746d617031" ,
357+ AggregatedSignature : "73696731" ,
358+ HeaderHash : "6861736831" ,
359+ HeaderEpoch : 2 ,
360+ HeaderNonce : 2 ,
361+ HeaderShardId : 2 ,
362+ HeaderRound : 2 ,
363+ IsStartOfEpoch : false ,
364+ },
365+ PreviousHeaderProof : & api.HeaderProof {
366+ PubKeysBitmap : "6269746d6170" ,
367+ AggregatedSignature : "736967" ,
368+ HeaderHash : "68617368" ,
369+ HeaderEpoch : 1 ,
370+ HeaderNonce : 3 ,
371+ HeaderShardId : 2 ,
372+ HeaderRound : 4 ,
373+ IsStartOfEpoch : true ,
374+ },
334375 EpochStartShardsData : []* data.EpochStartShardData {
335376 {
336377 ShardID : 1 ,
0 commit comments