add time of block acceptance to townhall
This commit is contained in:
parent
55697209a7
commit
4b134f0d21
@ -3,6 +3,7 @@ package metrics
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
logging "github.com/ipfs/go-log"
|
logging "github.com/ipfs/go-log"
|
||||||
@ -69,6 +70,7 @@ type message struct {
|
|||||||
Blocks []*types.BlockHeader
|
Blocks []*types.BlockHeader
|
||||||
Height uint64
|
Height uint64
|
||||||
Weight types.BigInt
|
Weight types.BigInt
|
||||||
|
Time uint64
|
||||||
|
|
||||||
// Meta
|
// Meta
|
||||||
|
|
||||||
@ -100,6 +102,7 @@ func sendHeadNotifs(ctx context.Context, ps *pubsub.PubSub, topic string, chain
|
|||||||
Height: n.Val.Height(),
|
Height: n.Val.Height(),
|
||||||
Weight: w,
|
Weight: w,
|
||||||
NodeName: nickname,
|
NodeName: nickname,
|
||||||
|
Time: uint64(time.Now().Unix()),
|
||||||
}
|
}
|
||||||
|
|
||||||
b, err := json.Marshal(m)
|
b, err := json.Marshal(m)
|
||||||
|
Loading…
Reference in New Issue
Block a user