[tm-monitor] use pubkey.Equals() func instead of raw `==` (#2221)

This commit is contained in:
bradyjoestar 2018-08-14 22:57:48 +08:00 committed by Anton Kaliaev
parent 3624a17642
commit ed08ae7321
1 changed files with 1 additions and 2 deletions

View File

@ -217,8 +217,7 @@ func (n *Node) checkIsValidator() {
if err == nil {
for _, v := range validators {
key, err1 := n.getPubKey()
// TODO: use bytes.Equal
if err1 == nil && v.PubKey == key {
if err1 == nil && v.PubKey.Equals(key) {
n.IsValidator = true
}
}