Skip to content

Commit

Permalink
FEAT: Extend tests in sovereignSubRoundEnd_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmihaic committed Jan 15, 2025
1 parent d19d1f9 commit 316d228
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion process/block/sovereignChainBlock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ func TestSovereignChainBlockProcessor_createAndSetOutGoingMiniBlock(t *testing.T
},
}

epoch := uint32(4)
poolAddCt := 0
pubKeysBitmap := []byte("pubKeysBitmap")
outGoingOperationsPool := &sovereign.OutGoingOperationsPoolMock{
AddCalled: func(data *sovereignCore.BridgeOutGoingData) {
defer func() {
Expand All @@ -286,6 +288,8 @@ func TestSovereignChainBlockProcessor_createAndSetOutGoingMiniBlock(t *testing.T
Data: bridgeOp2,
},
},
PubKeysBitmap: pubKeysBitmap,
Epoch: epoch,
}, data)
default:
require.Fail(t, "should not add in pool any other operation")
Expand All @@ -308,7 +312,12 @@ func TestSovereignChainBlockProcessor_createAndSetOutGoingMiniBlock(t *testing.T
SCToProtocol: &mock.SCToProtocolStub{},
})

sovChainHdr := &block.SovereignChainHeader{}
sovChainHdr := &block.SovereignChainHeader{
Header: &block.Header{
Epoch: epoch,
PubKeysBitmap: pubKeysBitmap,
},
}
processedMb := &block.MiniBlock{
ReceiverShardID: core.SovereignChainShardId,
SenderShardID: core.MainChainShardId,
Expand All @@ -335,6 +344,10 @@ func TestSovereignChainBlockProcessor_createAndSetOutGoingMiniBlock(t *testing.T
require.Nil(t, err)

expectedSovChainHeader := &block.SovereignChainHeader{
Header: &block.Header{
Epoch: epoch,
PubKeysBitmap: pubKeysBitmap,
},
OutGoingMiniBlockHeader: &block.OutGoingMiniBlockHeader{
Hash: expectedOutGoingMbHash,
OutGoingOperationsHash: bridgeOpsHash,
Expand Down

0 comments on commit 316d228

Please sign in to comment.