-
Notifications
You must be signed in to change notification settings - Fork 238
/
Copy pathrpc_get_accepting_blockhashes_of_txs.go
48 lines (40 loc) · 1.55 KB
/
rpc_get_accepting_blockhashes_of_txs.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
package appmessage
// TxIDBlockHashPair is an appmessage corresponding to
// its respective RPC message
type TxIDBlockHashPair struct {
TxID string
Hash string
}
// GetAcceptingBlockHashesOfTxsRequestMessage is an appmessage corresponding to
// its respective RPC message
type GetAcceptingBlockHashesOfTxsRequestMessage struct {
baseMessage
TxIDs []string
}
// Command returns the protocol command string for the message
func (msg *GetAcceptingBlockHashesOfTxsRequestMessage) Command() MessageCommand {
return CmdGetAcceptingBlockHashesOfTxsRequestMessage
}
// NewGetAcceptingBlockHashesOfTxsRequest returns a instance of the message
func NewGetAcceptingBlockHashesOfTxsRequest(txIDs []string) *GetAcceptingBlockHashesOfTxsRequestMessage {
return &GetAcceptingBlockHashesOfTxsRequestMessage{
TxIDs: txIDs,
}
}
// GetAcceptingBlockHashesOfTxsResponseMessage is an appmessage corresponding to
// its respective RPC message
type GetAcceptingBlockHashesOfTxsResponseMessage struct {
baseMessage
TxIDBlockHashPairs []*TxIDBlockHashPair
Error *RPCError
}
// Command returns the protocol command string for the message
func (msg *GetAcceptingBlockHashesOfTxsResponseMessage) Command() MessageCommand {
return CmdGetAcceptingBlockHashesOfTxsResponseMessage
}
// NewGetAcceptingBlockHashesOfTxsResponse returns an instance of the message
func NewGetAcceptingBlockHashesOfTxsResponse(txIDBlockHashPairs []*TxIDBlockHashPair) *GetAcceptingBlockHashesOfTxsResponseMessage {
return &GetAcceptingBlockHashesOfTxsResponseMessage{
TxIDBlockHashPairs: txIDBlockHashPairs,
}
}