mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Rename IncludeTransactionVerboseData flag to IncludeTransactions * Regenerate auto-generated files
46 lines
1.3 KiB
Go
46 lines
1.3 KiB
Go
package appmessage
|
|
|
|
// GetBlocksRequestMessage is an appmessage corresponding to
|
|
// its respective RPC message
|
|
type GetBlocksRequestMessage struct {
|
|
baseMessage
|
|
LowHash string
|
|
IncludeBlocks bool
|
|
IncludeTransactions bool
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *GetBlocksRequestMessage) Command() MessageCommand {
|
|
return CmdGetBlocksRequestMessage
|
|
}
|
|
|
|
// NewGetBlocksRequestMessage returns a instance of the message
|
|
func NewGetBlocksRequestMessage(lowHash string, includeBlocks bool,
|
|
includeTransactions bool) *GetBlocksRequestMessage {
|
|
return &GetBlocksRequestMessage{
|
|
LowHash: lowHash,
|
|
IncludeBlocks: includeBlocks,
|
|
IncludeTransactions: includeTransactions,
|
|
}
|
|
}
|
|
|
|
// GetBlocksResponseMessage is an appmessage corresponding to
|
|
// its respective RPC message
|
|
type GetBlocksResponseMessage struct {
|
|
baseMessage
|
|
BlockHashes []string
|
|
Blocks []*RPCBlock
|
|
|
|
Error *RPCError
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *GetBlocksResponseMessage) Command() MessageCommand {
|
|
return CmdGetBlocksResponseMessage
|
|
}
|
|
|
|
// NewGetBlocksResponseMessage returns a instance of the message
|
|
func NewGetBlocksResponseMessage() *GetBlocksResponseMessage {
|
|
return &GetBlocksResponseMessage{}
|
|
}
|