mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Eth1 bal monitoring followup (#2651)
* Add eth1 balance monitoring * lint * lint * priority * lint * use value in alerts * fix beacon-chain service * working on stability * more yaml * add more alerts to the finality alerts * add nother header to ignore * extend requirement time for low balance * remove old flag * remove extra flag * feedback to use consistent flag * PR feedback * fix image build
This commit is contained in:
committed by
Raul Jordan
parent
3f205e462f
commit
2617f5c3ac
@@ -10,6 +10,7 @@ go_library(
|
||||
deps = [
|
||||
"@com_github_ethereum_go_ethereum//common:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//ethclient:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//params:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -32,6 +33,7 @@ go_image(
|
||||
deps = [
|
||||
"@com_github_ethereum_go_ethereum//common:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//ethclient:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//params:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -111,10 +112,9 @@ func CurrentBlock() uint64 {
|
||||
|
||||
// ToEther from Wei.
|
||||
func ToEther(o *big.Int) *big.Float {
|
||||
pul, int := big.NewFloat(0), big.NewFloat(0)
|
||||
int.SetInt(o)
|
||||
pul.Mul(big.NewFloat(0.000000000000000001), int)
|
||||
return pul
|
||||
wei := big.NewFloat(0)
|
||||
wei.SetInt(o)
|
||||
return new(big.Float).Quo(wei, big.NewFloat(params.Ether))
|
||||
}
|
||||
|
||||
// MetricsHTTP - HTTP response handler for /metrics.
|
||||
|
||||
Reference in New Issue
Block a user