forked from toorop/go-bitcoind
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinfo.go
59 lines (55 loc) · 2.07 KB
/
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
package navcoind
type Info struct {
Version uint32 `json:"version"`
Protocolversion uint32 `json:"protocolversion"`
Walletversion uint32 `json:"walletversion"`
Balance float64 `json:"balance"`
Blocks uint32 `json:"blocks"`
Timeoffset int32 `json:"timeoffset"`
Connections uint32 `json:"connections"`
Proxy string `json:"proxy,omitempty"`
Difficulty float64 `json:"difficulty"`
Testnet bool `json:"testnet"`
Keypoololdest uint64 `json:"keypoololdest"`
KeypoolSize uint32 `json:"keypoolsize,omitempty"`
UnlockedUntil int64 `json:"unlocked_until,omitempty"`
Paytxfee float64 `json:"paytxfee"`
Relayfee float64 `json:"relayfee"`
Errors string `json:"errors"`
}
type BlockchainInfo struct {
Chain string `json:"chain"`
Blocks uint64 `json:"blocks"`
Headers uint64 `json:"headers"`
BestBlockHash string `json:"bestblockhash"`
Difficulty float64 `json:"difficulty"`
MedianTime uint64 `json:"mediantime"`
VerificationProgress float64 `json:"verificationprocess"`
ChainWork string `json:"chainwork"`
Pruned bool `json:"pruned"`
SoftForks []SoftFork `json:"softforks"`
Bip9SoftForks map[string]Bip9SoftFork `json:"bip9_softforks"`
}
type SoftFork struct {
Id string `json:"id"`
Version int `json:"version"`
Enforce struct {
Status bool `json:"status"`
Found uint `json:"found"`
Required uint `json:"required"`
Window uint `json:"window"`
}
Reject struct {
Status bool `json:"status"`
Found uint `json:"found"`
Required uint `json:"required"`
Window uint `json:"window"`
}
}
type Bip9SoftFork struct {
Id int `json:"id"`
Status string `json:"status"`
Bit uint `json:"bit"`
StartTime uint64 `json:"starttime"`
Timeout uint64 `json:"timeout"`
}