Skip to content

Commit

Permalink
Fix for failing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszslabon committed Aug 31, 2023
1 parent 874c320 commit b6d65d9
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions pkg/tbtc/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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{}
})
}

0 comments on commit b6d65d9

Please sign in to comment.