Expose utility metrics to go-sdk (#132)

pull/135/head
flicker-harmony 5 years ago committed by GitHub
parent c28ff50c79
commit b6dd8813bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      README.md
  2. 8
      cmd/subcommands/blockchain.go
  3. 2
      pkg/rpc/methods.go

@ -139,7 +139,10 @@ hmy --node="https://api.s1.p.hmny.io" staking collect-rewards \
17. Check active validators
hmy --node="https://api.s1.p.hmny.io" blockchain validator all-active
18. Check in-memory record of failed staking transactions
18. Get current staking utility metrics
hmy --node="https://api.s0.p.hmny.io" blockchain utility-metrics
19. Check in-memory record of failed staking transactions
hmy failures staking
```

@ -161,6 +161,14 @@ High level information about transaction, like blockNumber, blockHash
noLatest = true
return request(rpc.Method.ResendCX, []interface{}{args[0]})
},
}, {
Use: "utility-metrics",
Short: "Current utility metrics",
Args: cobra.ExactArgs(1),
Long: `Current staking utility metrics`,
RunE: func(cmd *cobra.Command, args []string) error {
return request(rpc.Method.GetCurrentUtilityMetrics, []interface{}{})
},
},
accountHistorySubCmd,
}

@ -60,6 +60,7 @@ type rpcEnumList struct {
GetPendingTxnsInPool method
GetPendingCrosslinks method
GetPendingCXReceipts method
GetCurrentUtilityMetrics method
ResendCX method
}
@ -113,6 +114,7 @@ var Method = rpcEnumList{
GetPendingTxnsInPool: "hmy_pendingTransactions",
GetPendingCrosslinks: "hmy_getPendingCrossLinks",
GetPendingCXReceipts: "hmy_getPendingCXReceipts",
GetCurrentUtilityMetrics: "hmy_getCurrentUtilityMetrics",
ResendCX: "hmy_resendCx",
}

Loading…
Cancel
Save