Skip to content

Commit

Permalink
Add missing mock for new GenesisHash call
Browse files Browse the repository at this point in the history
  • Loading branch information
dimartiro committed Sep 24, 2024
1 parent f2541a3 commit f879df0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dot/network/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 3 additions & 0 deletions dot/rpc/modules/system_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f879df0

Please sign in to comment.