diff --git a/consensus/debugging.go b/consensus/debugging.go index 43daf04c3..3fb26af85 100644 --- a/consensus/debugging.go +++ b/consensus/debugging.go @@ -184,7 +184,7 @@ func (m *consensusModule) sendGetMetadataStateSyncMessage(_ *messaging.DebugMess } for _, val := range validators { - if m.GetNodeAddress() != val.GetAddress() { + if m.GetNodeAddress() == val.GetAddress() { continue } valAddress := cryptoPocket.AddressFromString(val.GetAddress()) diff --git a/consensus/doc/CHANGELOG.md b/consensus/doc/CHANGELOG.md index d019cb7cc..40d42f642 100644 --- a/consensus/doc/CHANGELOG.md +++ b/consensus/doc/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.0.0.35] - 2023-02-28 + +- Fixed bug in `sendGetMetadataStateSyncMessage` + ## [0.0.0.34] - 2023-02-24 - Fixed `TestPacemakerCatchupSameStepDifferentRounds` test diff --git a/consensus/state_sync_handler.go b/consensus/state_sync_handler.go index e306df8b9..cd78a36f3 100644 --- a/consensus/state_sync_handler.go +++ b/consensus/state_sync_handler.go @@ -11,6 +11,7 @@ import ( func (m *consensusModule) HandleStateSyncMessage(stateSyncMessageAny *anypb.Any) error { m.m.Lock() defer m.m.Unlock() + m.logger.Info().Msg("Handling StateSyncMessage") switch stateSyncMessageAny.MessageName() { case StateSyncMessageContentType: @@ -33,6 +34,7 @@ func (m *consensusModule) HandleStateSyncMessage(stateSyncMessageAny *anypb.Any) func (m *consensusModule) handleStateSyncMessage(stateSyncMessage *typesCons.StateSyncMessage) error { switch stateSyncMessage.Message.(type) { case *typesCons.StateSyncMessage_MetadataReq: + m.logger.Info().Str("proto_type", "MetadataRequest").Msg("Handling StateSyncMessage MetadataReq") if !m.stateSync.IsServerModEnabled() { return fmt.Errorf("server module is not enabled") } @@ -40,6 +42,7 @@ func (m *consensusModule) handleStateSyncMessage(stateSyncMessage *typesCons.Sta case *typesCons.StateSyncMessage_MetadataRes: return m.stateSync.HandleStateSyncMetadataResponse(stateSyncMessage.GetMetadataRes()) case *typesCons.StateSyncMessage_GetBlockReq: + m.logger.Info().Str("proto_type", "GetBlockRequest").Msg("Handling StateSyncMessage MetadataReq") if !m.stateSync.IsServerModEnabled() { return fmt.Errorf("server module is not enabled") }