mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-26 23:46:08 +00:00
42 lines
1.4 KiB
Go
42 lines
1.4 KiB
Go
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,
|
|
}
|
|
}
|