mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-27 15:53:57 +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.
43 lines
1.2 KiB
Go
43 lines
1.2 KiB
Go
package appmessage
|
|
|
|
import "github.com/zoomy-network/zoomyd/domain/consensus/model/externalapi"
|
|
|
|
// GetBlockCountRequestMessage is an appmessage corresponding to
|
|
// its respective RPC message
|
|
type GetBlockCountRequestMessage struct {
|
|
baseMessage
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *GetBlockCountRequestMessage) Command() MessageCommand {
|
|
return CmdGetBlockCountRequestMessage
|
|
}
|
|
|
|
// NewGetBlockCountRequestMessage returns a instance of the message
|
|
func NewGetBlockCountRequestMessage() *GetBlockCountRequestMessage {
|
|
return &GetBlockCountRequestMessage{}
|
|
}
|
|
|
|
// GetBlockCountResponseMessage is an appmessage corresponding to
|
|
// its respective RPC message
|
|
type GetBlockCountResponseMessage struct {
|
|
baseMessage
|
|
BlockCount uint64
|
|
HeaderCount uint64
|
|
|
|
Error *RPCError
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *GetBlockCountResponseMessage) Command() MessageCommand {
|
|
return CmdGetBlockCountResponseMessage
|
|
}
|
|
|
|
// NewGetBlockCountResponseMessage returns a instance of the message
|
|
func NewGetBlockCountResponseMessage(syncInfo *externalapi.SyncInfo) *GetBlockCountResponseMessage {
|
|
return &GetBlockCountResponseMessage{
|
|
BlockCount: syncInfo.BlockCount,
|
|
HeaderCount: syncInfo.HeaderCount,
|
|
}
|
|
}
|