diff --git a/pkg/tbtc/node.go b/pkg/tbtc/node.go index 2ca42e3522..fe7b92d3d9 100644 --- a/pkg/tbtc/node.go +++ b/pkg/tbtc/node.go @@ -241,7 +241,11 @@ func (n *node) getSigningExecutor( return nil, false, fmt.Errorf("failed to get broadcast channel: [%v]", err) } - registerSigningUnmarshallers(broadcastChannel) + signing.RegisterUnmarshallers(broadcastChannel) + announcer.RegisterUnmarshaller(broadcastChannel) + broadcastChannel.SetUnmarshaler(func() net.TaggedUnmarshaler { + return &signingDoneMessage{} + }) membershipValidator := group.NewMembershipValidator( executorLogger, @@ -600,14 +604,3 @@ func withCancelOnBlock( return blockCtx, cancelBlockCtx } - -// registerSigningUnmarshallers initializes the given broadcast channel to be -// able to perform the signing protocol interactions by registering all the -// required protocol unmarshallers. -func registerSigningUnmarshallers(channel net.BroadcastChannel) { - signing.RegisterUnmarshallers(channel) - announcer.RegisterUnmarshaller(channel) - channel.SetUnmarshaler(func() net.TaggedUnmarshaler { - return &signingDoneMessage{} - }) -}