mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-26 23:46:08 +00:00
Just some name changes, put in a stand in emission amount, and started copying the algo from Karlsen. Not release worthy yet. Therefore Dev branch exists now. Also, for now this is for research purposes only. I got no clue what to build on top of Kaspa yet. Help would be appreciated for ideas and implementations.
35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
// Copyright (c) 2013-2016 The btcsuite developers
|
|
// Use of this source code is governed by an ISC
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package appmessage
|
|
|
|
import (
|
|
"github.com/zoomy-network/zoomyd/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// MsgRequestHeaders implements the Message interface and represents a kaspa
|
|
// RequestHeaders message. It is used to request a list of blocks starting after the
|
|
// low hash and until the high hash.
|
|
type MsgRequestHeaders struct {
|
|
baseMessage
|
|
LowHash *externalapi.DomainHash
|
|
HighHash *externalapi.DomainHash
|
|
}
|
|
|
|
// Command returns the protocol command string for the message. This is part
|
|
// of the Message interface implementation.
|
|
func (msg *MsgRequestHeaders) Command() MessageCommand {
|
|
return CmdRequestHeaders
|
|
}
|
|
|
|
// NewMsgRequstHeaders returns a new kaspa RequestHeaders message that conforms to the
|
|
// Message interface using the passed parameters and defaults for the remaining
|
|
// fields.
|
|
func NewMsgRequstHeaders(lowHash, highHash *externalapi.DomainHash) *MsgRequestHeaders {
|
|
return &MsgRequestHeaders{
|
|
LowHash: lowHash,
|
|
HighHash: highHash,
|
|
}
|
|
}
|