do not panic on unknonw messgae

Signed-off-by: Leo Chen <leo@harmony.one>
pull/178/head
Leo Chen 6 years ago
parent cc54244c4d
commit 64b9756bf6
  1. 4
      beaconchain/libs/beaconchain_handler.go

@ -48,10 +48,10 @@ func (bc *BeaconChain) BeaconChainHandler(s p2p.Stream) {
bc.log.Info("Identity Message Type is of the type Register")
bc.AcceptConnections(identityMsgPayload)
default:
panic("Unrecognized identity message type")
bc.log.Error("Unrecognized identity message type", "type", idMsgType)
}
default:
panic("Unrecognized message category")
bc.log.Error("Unrecognized message category", "actionType", actionType)
}
}

Loading…
Cancel
Save