-
Notifications
You must be signed in to change notification settings - Fork 23
/
database.go
51 lines (46 loc) · 1.75 KB
/
database.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
package types
type RecentBlock struct {
Height int `json:"height"`
Size int `json:"size"`
Timestamp int64 `json:"timestamp"`
TxCount int `json:"txCount"`
Weight int `json:"weight"`
}
type HistoricalMempoolData struct {
DataInBuckets interface{} `json:"dataInBuckets"`
Timestamp int64 `json:"timestamp"`
}
type TransactionStat struct {
SegwitCount int `json:"segwitCount"`
RbfCount int `json:"rbfCount"`
TxCount int `json:"txCount"`
Timestamp int64 `json:"timestamp"`
}
type MempoolEntry struct {
EntryTime int64 `json:"entryTime"`
TxID string `json:"txid"`
Fee int64 `json:"fee"`
Size int64 `json:"size"`
Version int32 `json:"version"`
InputCount int `json:"inputCount"`
OutputCount int `json:"outputCount"`
Locktime uint32 `json:"locktime"`
OutputSum int64 `json:"outputValue"`
SpendsSegWit bool `json:"spendsSegWit"`
SpendsMultisig bool `json:"spendsMultisig"`
IsBIP69 bool `json:"isBIP69"`
SignalsRBF bool `json:"signalsRBF"`
OPReturnData string `json:"opreturnData"`
OPReturnLength int `json:"opreturnLength"`
Multisig map[string]int `json:"multisigsSpend"`
Spends map[string]int `json:"spends"`
PaysTo map[string]int `json:"paysTo"`
}
// BlockEntry holds the height, the first-seen timestamp and
// shortended TXIDs. It's used in the Bitcoin Transaction Monitor
// to mark transactions by block they were included in.
type BlockEntry struct {
Height int `json:"height"`
Timestamp int64 `json:"timestamp"`
ShortTXIDs []string `json:"shortTXIDs"`
}