@ -206,6 +206,7 @@ func (hmy *Harmony) GetNodeMetadata() commonRPC.NodeMetadata {
Role: cfg.Role().String(),
DNSZone: cfg.DNSZone,
Archival: cfg.GetArchival(),
IsBackup: hmy.NodeAPI.IsBackup(),
NodeBootTime: hmy.NodeAPI.GetNodeBootTime(),
PeerID: nodeconfig.GetPeerID(),
Consensus: consensusInternal,
@ -838,10 +838,6 @@ func isBlockGreaterThanLatest(hmy *hmy.Harmony, blockNum rpc.BlockNumber) bool {
return uint64(blockNum) > hmy.CurrentBlock().NumberU64()
}
func (s *PublicBlockchainService) GetCurrentNodeBackupState(ctx context.Context) (bool, error) {
return s.hmy.NodeAPI.IsBackup(), nil
func (s *PublicBlockchainService) SetNodeToBackupMode(ctx context.Context, isBackup bool) (bool, error) {
return s.hmy.NodeAPI.SetNodeBackupMode(isBackup), nil
@ -64,6 +64,7 @@ type NodeMetadata struct {
Role string `json:"role"`
DNSZone string `json:"dns-zone"`
Archival bool `json:"is-archival"`
IsBackup bool `json:"is-backup"`
NodeBootTime int64 `json:"node-unix-start-time"`
PeerID peer.ID `json:"peerid"`
Consensus ConsensusInternal `json:"consensus"`