mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-05 21:56:50 +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
21 lines
688 B
Go
21 lines
688 B
Go
package externalapi
|
|
|
|
// UTXOEntry houses details about an individual transaction output in a utxo
|
|
// set such as whether or not it was contained in a coinbase tx, the blue
|
|
// score of the block that accepts the tx, its public key script, and how
|
|
// much it pays.
|
|
type UTXOEntry interface {
|
|
Amount() uint64
|
|
ScriptPublicKey() *ScriptPublicKey // The public key script for the output.
|
|
BlockDAAScore() uint64 // Blue score of the block accepting the tx.
|
|
IsCoinbase() bool
|
|
Equal(other UTXOEntry) bool
|
|
}
|
|
|
|
// OutpointAndUTXOEntryPair is an outpoint along with its
|
|
// respective UTXO entry
|
|
type OutpointAndUTXOEntryPair struct {
|
|
Outpoint *DomainOutpoint
|
|
UTXOEntry UTXOEntry
|
|
}
|