mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-24 06:25:55 +00:00
56 lines
1.6 KiB
Go
56 lines
1.6 KiB
Go
package appmessage
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
"github.com/c4ei/YunSeokYeol/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// MsgBlockWithTrustedData represents a kaspa BlockWithTrustedData message
|
|
type MsgBlockWithTrustedData struct {
|
|
baseMessage
|
|
|
|
Block *MsgBlock
|
|
DAAScore uint64
|
|
DAAWindow []*TrustedDataDataDAABlock
|
|
GHOSTDAGData []*BlockGHOSTDAGDataHashPair
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *MsgBlockWithTrustedData) Command() MessageCommand {
|
|
return CmdBlockWithTrustedData
|
|
}
|
|
|
|
// NewMsgBlockWithTrustedData returns a new MsgBlockWithTrustedData.
|
|
func NewMsgBlockWithTrustedData() *MsgBlockWithTrustedData {
|
|
return &MsgBlockWithTrustedData{}
|
|
}
|
|
|
|
// TrustedDataDataDAABlock is an appmessage representation of externalapi.TrustedDataDataDAABlock
|
|
type TrustedDataDataDAABlock struct {
|
|
Block *MsgBlock
|
|
GHOSTDAGData *BlockGHOSTDAGData
|
|
}
|
|
|
|
// BlockGHOSTDAGData is an appmessage representation of externalapi.BlockGHOSTDAGData
|
|
type BlockGHOSTDAGData struct {
|
|
BlueScore uint64
|
|
BlueWork *big.Int
|
|
SelectedParent *externalapi.DomainHash
|
|
MergeSetBlues []*externalapi.DomainHash
|
|
MergeSetReds []*externalapi.DomainHash
|
|
BluesAnticoneSizes []*BluesAnticoneSizes
|
|
}
|
|
|
|
// BluesAnticoneSizes is an appmessage representation of the BluesAnticoneSizes part of GHOSTDAG data.
|
|
type BluesAnticoneSizes struct {
|
|
BlueHash *externalapi.DomainHash
|
|
AnticoneSize externalapi.KType
|
|
}
|
|
|
|
// BlockGHOSTDAGDataHashPair is an appmessage representation of externalapi.BlockGHOSTDAGDataHashPair
|
|
type BlockGHOSTDAGDataHashPair struct {
|
|
Hash *externalapi.DomainHash
|
|
GHOSTDAGData *BlockGHOSTDAGData
|
|
}
|