Add chain.basefee
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
bf774fc29b
commit
239b5f547a
@ -129,6 +129,12 @@ func RecordTipsetPoints(ctx context.Context, api api.FullNode, pl *PointList, ti
|
|||||||
p = NewPoint("chain.blocktime", tsTime.Unix())
|
p = NewPoint("chain.blocktime", tsTime.Unix())
|
||||||
pl.AddPoint(p)
|
pl.AddPoint(p)
|
||||||
|
|
||||||
|
baseFeeBig := tipset.Blocks()[0].ParentBaseFee.Copy()
|
||||||
|
baseFeeRat := new(big.Rat).SetFrac(baseFeeBig.Int, new(big.Int).SetUint64(build.FilecoinPrecision))
|
||||||
|
baseFeeFloat, _ := baseFeeRat.Float64()
|
||||||
|
p = NewPoint("chain.basefee", baseFeeFloat)
|
||||||
|
pl.AddPoint(p)
|
||||||
|
|
||||||
for _, blockheader := range tipset.Blocks() {
|
for _, blockheader := range tipset.Blocks() {
|
||||||
bs, err := blockheader.Serialize()
|
bs, err := blockheader.Serialize()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user