mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-29 10:16:45 +00:00

* [NOD-1497] Add missing APIs. * [NOD-1497] Rename some new APIs. * [NOD-1497] Add fields to BlockInfo. * [NOD-1497] Add comments over BlockInfo and BlockLocator. * [NOD-1497] Rename GetSelectedParent to GetVirtualSelectedParent. * [NOD-1497] Add SetPruningPointUTXOSet. * [NOD-1497] Rename GetHashesAbovePruningPoint to GetMissingBlockBodyHashes. * [NOD-1497] Fix rename error.
28 lines
946 B
Go
28 lines
946 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
|
|
|
|
// StatusInvalidAncestor indicates that one of the block's ancestors has
|
|
// has failed validation, thus the block is also invalid.
|
|
StatusInvalidAncestor
|
|
|
|
// 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
|
|
)
|