mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-10 18:25:17 +00:00
quiet the messages
This commit is contained in:
parent
1b11e07095
commit
ebd7f723c6
@ -30,6 +30,11 @@ func (e *CeremonyDataClockConsensusEngine) runMessageHandler() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.peerMapMx.RLock()
|
||||||
|
peer, ok := e.peerMap[string(message.From)]
|
||||||
|
e.peerMapMx.RUnlock()
|
||||||
|
|
||||||
|
if ok && bytes.Compare(peer.version, config.GetMinimumVersion()) >= 0 {
|
||||||
for name := range e.executionEngines {
|
for name := range e.executionEngines {
|
||||||
name := name
|
name := name
|
||||||
go func() error {
|
go func() error {
|
||||||
@ -75,6 +80,7 @@ func (e *CeremonyDataClockConsensusEngine) runMessageHandler() {
|
|||||||
return nil
|
return nil
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
any := &anypb.Any{}
|
any := &anypb.Any{}
|
||||||
if err := proto.Unmarshal(msg.Payload, any); err != nil {
|
if err := proto.Unmarshal(msg.Payload, any); err != nil {
|
||||||
@ -84,12 +90,12 @@ func (e *CeremonyDataClockConsensusEngine) runMessageHandler() {
|
|||||||
go func() {
|
go func() {
|
||||||
switch any.TypeUrl {
|
switch any.TypeUrl {
|
||||||
case protobufs.ClockFrameType:
|
case protobufs.ClockFrameType:
|
||||||
e.peerMapMx.RLock()
|
if !ok || bytes.Compare(
|
||||||
if peer, ok := e.peerMap[string(message.From)]; !ok ||
|
peer.version,
|
||||||
bytes.Compare(peer.version, config.GetMinimumVersion()) < 0 {
|
config.GetMinimumVersion(),
|
||||||
|
) < 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
e.peerMapMx.RUnlock()
|
|
||||||
if err := e.handleClockFrameData(
|
if err := e.handleClockFrameData(
|
||||||
message.From,
|
message.From,
|
||||||
msg.Address,
|
msg.Address,
|
||||||
|
Loading…
Reference in New Issue
Block a user