mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Replace blue score with DAA score in UTXO entries * Use DAA score for coinbase maturity * Use DAA score for sequence lock * Fix calcBlockSubsidy to use DAA score * Don't pay to blocks that are not included in the DAA added blocks, and bestow red blocks reward to the merging block * Fix TestGetPruningPointUTXOs * Fix TestTransactionAcceptance * Fix TestChainedTransactions * Fix TestVirtualDiff * Fix TestBlockWindow * Fix TestPruning * Use NewFromSlice instead of manually creating the hash set * Add assert * Add comment * Remove redundant call to UpdateDAADataAndReturnDifficultyBits * Add RequiredDifficulty, rename UpdateDAADataAndReturnDifficultyBits to StageDAADataAndReturnRequiredDifficulty and add comments * Make buildUTXOInvalidHeader get bits as an argument * Fix comments
37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package appmessage
|
|
|
|
import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
|
|
// MsgPruningPointUTXOSetChunk represents a kaspa PruningPointUTXOSetChunk message
|
|
type MsgPruningPointUTXOSetChunk struct {
|
|
baseMessage
|
|
OutpointAndUTXOEntryPairs []*OutpointAndUTXOEntryPair
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *MsgPruningPointUTXOSetChunk) Command() MessageCommand {
|
|
return CmdPruningPointUTXOSetChunk
|
|
}
|
|
|
|
// NewMsgPruningPointUTXOSetChunk returns a new MsgPruningPointUTXOSetChunk.
|
|
func NewMsgPruningPointUTXOSetChunk(outpointAndUTXOEntryPairs []*OutpointAndUTXOEntryPair) *MsgPruningPointUTXOSetChunk {
|
|
return &MsgPruningPointUTXOSetChunk{
|
|
OutpointAndUTXOEntryPairs: outpointAndUTXOEntryPairs,
|
|
}
|
|
}
|
|
|
|
// OutpointAndUTXOEntryPair is an outpoint along with its
|
|
// respective UTXO entry
|
|
type OutpointAndUTXOEntryPair struct {
|
|
Outpoint *Outpoint
|
|
UTXOEntry *UTXOEntry
|
|
}
|
|
|
|
// UTXOEntry houses details about an individual transaction output in a UTXO
|
|
type UTXOEntry struct {
|
|
Amount uint64
|
|
ScriptPublicKey *externalapi.ScriptPublicKey
|
|
BlockDAAScore uint64
|
|
IsCoinbase bool
|
|
}
|