-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathtypes.go
60 lines (50 loc) · 972 Bytes
/
types.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
package common
import (
"strings"
"time"
"github.com/ethereum/go-ethereum/core/types"
)
type TxIn struct {
T time.Time
Tx *types.Transaction
Source string
}
type BlxRawTxMsg struct {
Params struct {
Result struct {
RawTx string
}
}
}
type EdenRawTxMsg struct {
Params struct {
Result struct {
RLP string
}
}
}
type SourceComp struct {
Source string
Reference string
}
func NewSourceComps(args []string) (srcComp []SourceComp) {
srcComp = make([]SourceComp, 0)
for _, entries := range args {
parts := strings.Split(entries, "-")
if len(parts) != 2 {
continue
}
srcComp = append(srcComp, SourceComp{
Source: parts[0],
Reference: parts[1],
})
}
return
}
var DefaultSourceComparisons = []SourceComp{
{SourceTagBloxroute, SourceTagLocal},
{SourceTagChainbound, SourceTagLocal},
{SourceTagBloxroute, SourceTagChainbound},
{SourceTagBloxroute, SourceTagEden},
{SourceTagChainbound, SourceTagEden},
}