mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-13 13:00:10 +00:00
28 lines
764 B
Go
28 lines
764 B
Go
package appmessage
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// MsgIBDBlockLocator represents a kaspa ibdBlockLocator message
|
|
type MsgIBDBlockLocator struct {
|
|
baseMessage
|
|
TargetHash *externalapi.DomainHash
|
|
BlockLocatorHashes []*externalapi.DomainHash
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *MsgIBDBlockLocator) Command() MessageCommand {
|
|
return CmdIBDBlockLocator
|
|
}
|
|
|
|
// NewMsgIBDBlockLocator returns a new kaspa ibdBlockLocator message
|
|
func NewMsgIBDBlockLocator(targetHash *externalapi.DomainHash,
|
|
blockLocatorHashes []*externalapi.DomainHash) *MsgIBDBlockLocator {
|
|
|
|
return &MsgIBDBlockLocator{
|
|
TargetHash: targetHash,
|
|
BlockLocatorHashes: blockLocatorHashes,
|
|
}
|
|
}
|