-
Notifications
You must be signed in to change notification settings - Fork 13
/
mixinnet_info.go
83 lines (72 loc) · 2.24 KB
/
mixinnet_info.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package mixin
import (
"time"
"github.com/shopspring/decimal"
)
type (
Mint struct {
Pool decimal.Decimal `json:"pool"`
Pledge decimal.Decimal `json:"pledge"`
Batch uint64 `json:"batch"`
}
Queue struct {
Finals uint64 `json:"finals"`
Caches uint64 `json:"caches"`
}
ConsensusNode struct {
Node Hash `json:"node"`
Signer MixinnetAddress `json:"signer"`
Payee MixinnetAddress `json:"payee"`
State string `json:"state"`
Timestamp int64 `json:"timestamp"`
Transaction Hash `json:"transaction"`
Aggregator uint64 `json:"aggregator"`
Works [2]uint64 `json:"works"`
}
GraphReferences struct {
External Hash `json:"external"`
Self Hash `json:"self"`
}
GraphSnapshot struct {
Node Hash `json:"node"`
Hash Hash `json:"hash"`
References GraphReferences `json:"references"`
Round uint64 `json:"round"`
Timestamp int64 `json:"timestamp"`
Transaction Hash `json:"transaction"`
Signature string `json:"signature"` // CosiSignature
Version int `json:"version"`
}
GraphCache struct {
Node Hash `json:"node"`
References GraphReferences `json:"references"`
Timestamp int64 `json:"timestamp"`
Round uint64 `json:"round"`
Snapshots []*GraphSnapshot `json:"snapshots"`
}
GraphFinal struct {
Node Hash `json:"node"`
Hash Hash `json:"hash"`
Start int64 `json:"start"`
End int64 `json:"end"`
Round uint64 `json:"round"`
}
Graph struct {
SPS float64 `json:"sps"`
Topology uint64 `json:"topology"`
Consensus []*ConsensusNode `json:"consensus"`
Final map[string]*GraphFinal `json:"final"`
Cache map[string]*GraphCache `json:"cache"`
}
ConsensusInfo struct {
Network Hash `json:"network"`
Node Hash `json:"node"`
Version string `json:"version"`
Uptime string `json:"uptime"`
Epoch time.Time `json:"epoch"`
Timestamp time.Time `json:"timestamp"`
Mint Mint `json:"mint"`
Queue Queue `json:"queue"`
Graph Graph `json:"graph"`
}
)