mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-24 06:25:55 +00:00
28 lines
913 B
Go
28 lines
913 B
Go
package appmessage
|
|
|
|
import (
|
|
"github.com/c4ei/YunSeokYeol/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// MsgIBDChainBlockLocator implements the Message interface and represents a kaspa
|
|
// locator message. It is used to find the blockLocator of a peer that is
|
|
// syncing with you.
|
|
type MsgIBDChainBlockLocator struct {
|
|
baseMessage
|
|
BlockLocatorHashes []*externalapi.DomainHash
|
|
}
|
|
|
|
// Command returns the protocol command string for the message. This is part
|
|
// of the Message interface implementation.
|
|
func (msg *MsgIBDChainBlockLocator) Command() MessageCommand {
|
|
return CmdIBDChainBlockLocator
|
|
}
|
|
|
|
// NewMsgIBDChainBlockLocator returns a new kaspa locator message that conforms to
|
|
// the Message interface. See MsgBlockLocator for details.
|
|
func NewMsgIBDChainBlockLocator(locatorHashes []*externalapi.DomainHash) *MsgIBDChainBlockLocator {
|
|
return &MsgIBDChainBlockLocator{
|
|
BlockLocatorHashes: locatorHashes,
|
|
}
|
|
}
|