Skip to content

Commit

Permalink
Use genesis hash to register the warp sync handler
Browse files Browse the repository at this point in the history
  • Loading branch information
dimartiro committed Sep 19, 2024
1 parent c046b53 commit f3258f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dot/network/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,10 @@ func (s *Service) Start() error {
s.ctx, s.cancel = context.WithCancel(context.Background())
}

genesisHashProtocolId := protocol.ID(s.cfg.BlockState.GenesisHash().String())

s.host.registerStreamHandler(s.host.protocolID+SyncID, s.handleSyncStream)
s.host.registerStreamHandler(s.host.protocolID+WarpSyncID, s.handleWarpSyncStream)
s.host.registerStreamHandler(genesisHashProtocolId+WarpSyncID, s.handleWarpSyncStream)
s.host.registerStreamHandler(s.host.protocolID+lightID, s.handleLightStream)

// register block announce protocol
Expand Down

0 comments on commit f3258f1

Please sign in to comment.