diff --git a/block/fork_test.go b/block/fork_test.go index c0045806e..218585f1b 100644 --- a/block/fork_test.go +++ b/block/fork_test.go @@ -241,7 +241,14 @@ func TestCreateInstruction(t *testing.T) { manager := &Manager{ RootDir: t.TempDir(), // Use temporary directory for testing } + mockSL := new(settlement.MockClientI) + mockSL.On("GetObsoleteDrs").Return([]uint32{}, nil) + mockSL.On("GetRollapp").Return(&types.Rollapp{ + Revision: 2, + RevisionStartHeight: 100, + }, nil) + manager.SLClient = mockSL err := manager.createInstruction(tt.rollapp) if tt.expectedError { assert.Error(t, err) diff --git a/settlement/grpc/grpc.go b/settlement/grpc/grpc.go index e74d8bde9..96b1ed38d 100644 --- a/settlement/grpc/grpc.go +++ b/settlement/grpc/grpc.go @@ -58,7 +58,7 @@ func (c *Client) GetRollapp() (*types.Rollapp, error) { // GetObsoleteDrs returns the list of deprecated DRS. func (c *Client) GetObsoleteDrs() ([]uint32, error) { - panic("GetObsoleteDrs not implemented in local SL") + return []uint32{}, nil } var _ settlement.ClientI = (*Client)(nil) diff --git a/settlement/local/local.go b/settlement/local/local.go index f393da644..9a308820b 100644 --- a/settlement/local/local.go +++ b/settlement/local/local.go @@ -246,7 +246,7 @@ func (c *Client) GetAllSequencers() ([]types.Sequencer, error) { // GetObsoleteDrs returns the list of deprecated DRS. func (c *Client) GetObsoleteDrs() ([]uint32, error) { - panic("GetObsoleteDrs not implemented in local SL") + return []uint32{}, nil } // GetBondedSequencers implements settlement.ClientI. diff --git a/types/instruction_test.go b/types/instruction_test.go index 7bcfbab5d..0dea0111d 100644 --- a/types/instruction_test.go +++ b/types/instruction_test.go @@ -22,8 +22,7 @@ func TestPersistInstruction(t *testing.T) { require.NoError(t, err) require.Equal(t, instructionWithNilFaultyDrs, instruction) - faultyDrs := new(uint64) - *faultyDrs = 1 + faultyDrs := []uint32{1} instructionWithFaultyDrs := Instruction{ Revision: 1, RevisionStartHeight: 1,