Merge pull request #960 from harmony-ek/fix_garbled_validator_address_error

Fix garbled validator address errors
pull/962/head
Eugene Kim 5 years ago committed by GitHub
commit 71623d5dd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      consensus/consensus_service.go

@ -510,7 +510,7 @@ func (consensus *Consensus) verifySenderKey(msg *msg_pb.Message) (*bls.PublicKey
senderAddr := common.BytesToAddress(addrBytes[:]) senderAddr := common.BytesToAddress(addrBytes[:])
if !consensus.IsValidatorInCommittee(senderAddr) { if !consensus.IsValidatorInCommittee(senderAddr) {
return nil, fmt.Errorf("Validator address %s is not in committee", senderAddr) return nil, fmt.Errorf("Validator address %s is not in committee", senderAddr.Hex())
} }
return senderKey, nil return senderKey, nil
} }
@ -525,7 +525,7 @@ func (consensus *Consensus) verifyViewChangeSenderKey(msg *msg_pb.Message) (*bls
senderAddr := common.BytesToAddress(addrBytes[:]) senderAddr := common.BytesToAddress(addrBytes[:])
if !consensus.IsValidatorInCommittee(senderAddr) { if !consensus.IsValidatorInCommittee(senderAddr) {
return nil, common.Address{}, fmt.Errorf("Validator address %s is not in committee", senderAddr) return nil, common.Address{}, fmt.Errorf("Validator address %s is not in committee", senderAddr.Hex())
} }
return senderKey, senderAddr, nil return senderKey, senderAddr, nil
} }

Loading…
Cancel
Save