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

* [NOD-1525] Implement headers first IBD * [NOD-1525] Fix proto translators * [NOD-1525] Register missing flows * [NOD-1525] Rename SyncStateNormal->SyncStateRelay, simplifiy IBD peer selection code and get rid of panic in FinishIBD * [NOD-1525] Remove redundant methods from interface
22 lines
1.0 KiB
Go
22 lines
1.0 KiB
Go
package externalapi
|
|
|
|
// Consensus maintains the current core state of the node
|
|
type Consensus interface {
|
|
BuildBlock(coinbaseData *DomainCoinbaseData, transactions []*DomainTransaction) (*DomainBlock, error)
|
|
ValidateAndInsertBlock(block *DomainBlock) error
|
|
ValidateTransactionAndPopulateWithConsensusData(transaction *DomainTransaction) error
|
|
|
|
GetBlock(blockHash *DomainHash) (*DomainBlock, error)
|
|
GetBlockHeader(blockHash *DomainHash) (*DomainBlockHeader, error)
|
|
GetBlockInfo(blockHash *DomainHash) (*BlockInfo, error)
|
|
|
|
GetHashesBetween(lowHash, highHash *DomainHash) ([]*DomainHash, error)
|
|
GetMissingBlockBodyHashes(highHash *DomainHash) ([]*DomainHash, error)
|
|
GetPruningPointUTXOSet(expectedPruningPointHash *DomainHash) ([]byte, error)
|
|
SetPruningPointUTXOSet(serializedUTXOSet []byte) error
|
|
GetVirtualSelectedParent() (*DomainBlock, error)
|
|
CreateBlockLocator(lowHash, highHash *DomainHash) (BlockLocator, error)
|
|
FindNextBlockLocatorBoundaries(blockLocator BlockLocator) (lowHash, highHash *DomainHash, err error)
|
|
GetSyncInfo() (*SyncInfo, error)
|
|
}
|