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
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package appmessage
|
|
|
|
// GetBlockRequestMessage is an appmessage corresponding to
|
|
// its respective RPC message
|
|
type GetBlockRequestMessage struct {
|
|
baseMessage
|
|
Hash string
|
|
IncludeTransactions bool
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *GetBlockRequestMessage) Command() MessageCommand {
|
|
return CmdGetBlockRequestMessage
|
|
}
|
|
|
|
// NewGetBlockRequestMessage returns a instance of the message
|
|
func NewGetBlockRequestMessage(hash string, includeTransactions bool) *GetBlockRequestMessage {
|
|
return &GetBlockRequestMessage{
|
|
Hash: hash,
|
|
IncludeTransactions: includeTransactions,
|
|
}
|
|
}
|
|
|
|
// GetBlockResponseMessage is an appmessage corresponding to
|
|
// its respective RPC message
|
|
type GetBlockResponseMessage struct {
|
|
baseMessage
|
|
Block *RPCBlock
|
|
|
|
Error *RPCError
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *GetBlockResponseMessage) Command() MessageCommand {
|
|
return CmdGetBlockResponseMessage
|
|
}
|
|
|
|
// NewGetBlockResponseMessage returns a instance of the message
|
|
func NewGetBlockResponseMessage() *GetBlockResponseMessage {
|
|
return &GetBlockResponseMessage{}
|
|
}
|