mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-24 07:46:45 +00:00

* [NOD-1496] Implement headers only verification * [NOD-1496] Add checkParentsExist * [NOD-1496] Stage block statuses in block processor * [NOD-1496] Rename AddBlock->AddHeaderTip * [NOD-1496] Return early from validateAndInsertBlock on header only and put ValidateProofOfWorkAndDifficulty inside validateBlock
27 lines
909 B
Go
27 lines
909 B
Go
package externalapi
|
|
|
|
// BlockStatus represents the validation state of the block.
|
|
type BlockStatus byte
|
|
|
|
const (
|
|
// StatusInvalid indicates that the block is invalid.
|
|
StatusInvalid BlockStatus = iota
|
|
|
|
// StatusValid indicates that the block has been fully validated.
|
|
StatusValid
|
|
|
|
// StatusValidateFailed indicates that the block has failed validation.
|
|
StatusValidateFailed
|
|
|
|
// StatusUTXOPendingVerification indicates that the block is pending verification against its past UTXO-Set, either
|
|
// because it was not yet verified since the block was never in the selected parent chain, or if the
|
|
// block violates finality.
|
|
StatusUTXOPendingVerification
|
|
|
|
// StatusDisqualifiedFromChain indicates that the block is not eligible to be a selected parent.
|
|
StatusDisqualifiedFromChain
|
|
|
|
// StatusHeaderOnly indicates that the block transactions are not held (pruned or wasn't added yet)
|
|
StatusHeaderOnly
|
|
)
|