mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-20 13:56:45 +00:00

* Return headers first * Delete TestHandleRelayInvs * resolve virtual only after IBD * Fix ResolveVirtual * Fix comments and variable names
27 lines
760 B
Go
27 lines
760 B
Go
package appmessage
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// MsgRequestIBDBlocks implements the Message interface and represents a kaspa
|
|
// RequestIBDBlocks message. It is used to request blocks as part of the IBD
|
|
// protocol.
|
|
type MsgRequestIBDBlocks struct {
|
|
baseMessage
|
|
Hashes []*externalapi.DomainHash
|
|
}
|
|
|
|
// Command returns the protocol command string for the message. This is part
|
|
// of the Message interface implementation.
|
|
func (msg *MsgRequestIBDBlocks) Command() MessageCommand {
|
|
return CmdRequestIBDBlocks
|
|
}
|
|
|
|
// NewMsgRequestIBDBlocks returns a new MsgRequestIBDBlocks.
|
|
func NewMsgRequestIBDBlocks(hashes []*externalapi.DomainHash) *MsgRequestIBDBlocks {
|
|
return &MsgRequestIBDBlocks{
|
|
Hashes: hashes,
|
|
}
|
|
}
|