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.
32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
package appmessage
|
|
|
|
import (
|
|
"github.com/zoomy-network/zoomyd/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// MaxInvPerRequestTransactionsMsg is the maximum number of hashes that can
|
|
// be in a single CmdInvTransaction message.
|
|
const MaxInvPerRequestTransactionsMsg = MaxInvPerMsg
|
|
|
|
// MsgRequestTransactions implements the Message interface and represents a kaspa
|
|
// RequestTransactions message. It is used to request transactions as part of the
|
|
// transactions relay protocol.
|
|
type MsgRequestTransactions struct {
|
|
baseMessage
|
|
IDs []*externalapi.DomainTransactionID
|
|
}
|
|
|
|
// Command returns the protocol command string for the message. This is part
|
|
// of the Message interface implementation.
|
|
func (msg *MsgRequestTransactions) Command() MessageCommand {
|
|
return CmdRequestTransactions
|
|
}
|
|
|
|
// NewMsgRequestTransactions returns a new kaspa RequestTransactions message that conforms to
|
|
// the Message interface. See MsgRequestTransactions for details.
|
|
func NewMsgRequestTransactions(ids []*externalapi.DomainTransactionID) *MsgRequestTransactions {
|
|
return &MsgRequestTransactions{
|
|
IDs: ids,
|
|
}
|
|
}
|