From f879df047a5e042fa42b8427d15980c106f3a24d Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 23 Sep 2024 22:42:16 -0300 Subject: [PATCH] Add missing mock for new GenesisHash call --- dot/network/service.go | 2 +- dot/rpc/modules/system_integration_test.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dot/network/service.go b/dot/network/service.go index 4df54893ad..864728f6fb 100644 --- a/dot/network/service.go +++ b/dot/network/service.go @@ -258,8 +258,8 @@ func (s *Service) Start() error { genesisHashProtocolId := protocol.ID(s.cfg.BlockState.GenesisHash().String()) s.host.registerStreamHandler(s.host.protocolID+SyncID, s.handleSyncStream) - s.host.registerStreamHandler(genesisHashProtocolId+WarpSyncID, s.handleWarpSyncStream) s.host.registerStreamHandler(s.host.protocolID+lightID, s.handleLightStream) + s.host.registerStreamHandler(genesisHashProtocolId+WarpSyncID, s.handleWarpSyncStream) // register block announce protocol err := s.RegisterNotificationsProtocol( diff --git a/dot/rpc/modules/system_integration_test.go b/dot/rpc/modules/system_integration_test.go index 275a741892..1296226ffe 100644 --- a/dot/rpc/modules/system_integration_test.go +++ b/dot/rpc/modules/system_integration_test.go @@ -52,6 +52,9 @@ func newNetworkService(t *testing.T) *network.Service { blockStateMock.EXPECT(). GetHighestFinalisedHeader(). Return(types.NewEmptyHeader(), nil).AnyTimes() + blockStateMock.EXPECT(). + GenesisHash(). + Return(common.MustBlake2bHash([]byte("genesis"))).AnyTimes() syncerMock := NewMockSyncer(ctrl)