[rpc] Account for ExplorerNode with BLS keys changes for NodeMetadata

pull/2600/head
Janet Liang 5 years ago
parent 7f1dd41fc8
commit fb4dabedd9
  1. 4
      internal/hmyapi/apiv1/harmony.go
  2. 4
      internal/hmyapi/apiv2/harmony.go

@ -72,10 +72,12 @@ func (s *PublicHarmonyAPI) GetNodeMetadata() NodeMetadata {
blockEpoch = &b
}
var blsKeys []string
blsKeys := []string{}
if cfg.ConsensusPubKey != nil {
for _, key := range cfg.ConsensusPubKey.PublicKey {
blsKeys = append(blsKeys, key.SerializeToHexStr())
}
}
return NodeMetadata{
blsKeys,

@ -71,10 +71,12 @@ func (s *PublicHarmonyAPI) GetNodeMetadata() NodeMetadata {
blockEpoch = &b
}
var blsKeys []string
blsKeys := []string{}
if cfg.ConsensusPubKey != nil {
for _, key := range cfg.ConsensusPubKey.PublicKey {
blsKeys = append(blsKeys, key.SerializeToHexStr())
}
}
return NodeMetadata{
blsKeys,

Loading…
Cancel
Save