Documentation ¶
Index ¶
- func LoadOrNewBlockchain(db dbm.DB, genesisDoc *genesis.GenesisDoc, logger *logging.Logger) (*blockchain, error)
- func NewRoot(genesisDoc *genesis.GenesisDoc) *root
- func NewTip(chainID string, genesisTime time.Time, genesisHash []byte) *tip
- type Blockchain
- type MutableBlockchain
- type PersistedState
- type Root
- type Tip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadOrNewBlockchain ¶ added in v0.18.0
func NewRoot ¶ added in v0.18.0
func NewRoot(genesisDoc *genesis.GenesisDoc) *root
Types ¶
type Blockchain ¶ added in v0.18.0
type Blockchain interface { // Read locker sync.Locker Root Tip // Returns an immutable copy of the tip Tip() Tip // Returns a copy of the current validator set Validators() []acm.Validator }
Burrow's portion of the Blockchain state
type MutableBlockchain ¶ added in v0.18.0
type MutableBlockchain interface { Blockchain CommitBlock(blockTime time.Time, blockHash, appHash []byte) error }
type PersistedState ¶ added in v0.18.0
type PersistedState struct { AppHashAfterLastBlock []byte LastBlockHeight uint64 GenesisDoc genesis.GenesisDoc }
func Decode ¶ added in v0.18.0
func Decode(encodedState []byte) (*PersistedState, error)
type Root ¶ added in v0.18.0
type Root interface { // GenesisHash precomputed from GenesisDoc GenesisHash() []byte GenesisDoc() genesis.GenesisDoc }
Immutable Root of blockchain
type Tip ¶ added in v0.18.0
type Tip interface { // ChainID precomputed from GenesisDoc ChainID() string // All Last* references are to the block last committed LastBlockHeight() uint64 LastBlockTime() time.Time LastBlockHash() []byte // Note this is the hash of the application state after the most recently committed block's transactions executed // and so lastBlock.Header.AppHash will be one block older than our AppHashAfterLastBlock (i.e. Tendermint closes // the AppHash we return from ABCI Commit into the _next_ block) AppHashAfterLastBlock() []byte }
Immutable pointer to the current tip of the blockchain
Click to show internal directories.
Click to hide internal directories.