-
Notifications
You must be signed in to change notification settings - Fork 238
/
Copy pathrpc_get_including_blockhashes_of_txs.go
41 lines (34 loc) · 1.4 KB
/
rpc_get_including_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
package appmessage
// GetIncludingBlockHashesOfTxsRequestMessage is an appmessage corresponding to
// its respective RPC message
type GetIncludingBlockHashesOfTxsRequestMessage struct {
baseMessage
TxIDs []string
}
// Command returns the protocol command string for the message
func (msg *GetIncludingBlockHashesOfTxsRequestMessage) Command() MessageCommand {
return CmdGetIncludingBlockHashesOfTxsRequestMessage
}
// NewGetIncludingBlockHashesOfTxsRequest returns a instance of the message
func NewGetIncludingBlockHashesOfTxsRequest(txIDs []string) *GetIncludingBlockHashesOfTxsRequestMessage {
return &GetIncludingBlockHashesOfTxsRequestMessage{
TxIDs: txIDs,
}
}
// GetIncludingBlockHashesOfTxsResponseMessage is an appmessage corresponding to
// its respective RPC message
type GetIncludingBlockHashesOfTxsResponseMessage struct {
baseMessage
TxIDBlockHashPairs []*TxIDBlockHashPair
Error *RPCError
}
// Command returns the protocol command string for the message
func (msg *GetIncludingBlockHashesOfTxsResponseMessage) Command() MessageCommand {
return CmdGetIncludingBlockHashesOfTxsResponseMessage
}
// NewGetIncludingBlockHashesOfTxsResponse returns an instance of the message
func NewGetIncludingBlockHashesOfTxsResponse(txIDBlockHashPairs []*TxIDBlockHashPair) *GetIncludingBlockHashesOfTxsResponseMessage {
return &GetIncludingBlockHashesOfTxsResponseMessage{
TxIDBlockHashPairs: txIDBlockHashPairs,
}
}