 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- type Blockchain
- func (bc *Blockchain) AppHashAfterLastBlock() []byte
- func (bc *Blockchain) ChainID() string
- func (bc *Blockchain) CommitBlock(blockTime time.Time, blockHash, appHash []byte) (totalPowerChange, totalFlow *big.Int, err error)
- func (bc *Blockchain) CurrentValidators() *validator.Set
- func (bc *Blockchain) Encode() ([]byte, error)
- func (bc *Blockchain) GenesisDoc() genesis.GenesisDoc
- func (bc *Blockchain) GenesisHash() []byte
- func (bc *Blockchain) LastBlockHash() []byte
- func (bc *Blockchain) LastBlockHeight() uint64
- func (bc *Blockchain) LastBlockTime() time.Time
- func (bc *Blockchain) LastCommitTime() time.Time
- func (bc *Blockchain) NumValidators() int
- func (bc *Blockchain) PendingValidators() validator.IterableReader
- func (bc *Blockchain) PreviousValidators(delay int) *validator.Set
- func (bc *Blockchain) ValidatorChecker() validator.Writer
- func (bc *Blockchain) ValidatorWriter() validator.Writer
- func (bc *Blockchain) Validators() validator.IterableReader
- func (bc *Blockchain) ValidatorsHistory() (*validator.Set, []*validator.Set, uint64)
 
- type BlockchainInfo
- type PersistedState
Constants ¶
      View Source
      
  const DefaultValidatorsWindowSize = 10
    Blocks to average validator power over
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockchain ¶
func DecodeBlockchain ¶
func DecodeBlockchain(encodedState []byte) (*Blockchain, error)
func LoadOrNewBlockchain ¶
func LoadOrNewBlockchain(db dbm.DB, genesisDoc *genesis.GenesisDoc, logger *logging.Logger) (*Blockchain, error)
func (*Blockchain) AppHashAfterLastBlock ¶
func (bc *Blockchain) AppHashAfterLastBlock() []byte
func (*Blockchain) ChainID ¶
func (bc *Blockchain) ChainID() string
func (*Blockchain) CommitBlock ¶
func (*Blockchain) CurrentValidators ¶
func (bc *Blockchain) CurrentValidators() *validator.Set
func (*Blockchain) Encode ¶
func (bc *Blockchain) Encode() ([]byte, error)
func (*Blockchain) GenesisDoc ¶
func (bc *Blockchain) GenesisDoc() genesis.GenesisDoc
func (*Blockchain) GenesisHash ¶
func (bc *Blockchain) GenesisHash() []byte
func (*Blockchain) LastBlockHash ¶
func (bc *Blockchain) LastBlockHash() []byte
func (*Blockchain) LastBlockHeight ¶
func (bc *Blockchain) LastBlockHeight() uint64
func (*Blockchain) LastBlockTime ¶
func (bc *Blockchain) LastBlockTime() time.Time
func (*Blockchain) LastCommitTime ¶ added in v0.20.1
func (bc *Blockchain) LastCommitTime() time.Time
func (*Blockchain) NumValidators ¶
func (bc *Blockchain) NumValidators() int
func (*Blockchain) PendingValidators ¶
func (bc *Blockchain) PendingValidators() validator.IterableReader
func (*Blockchain) PreviousValidators ¶
func (bc *Blockchain) PreviousValidators(delay int) *validator.Set
func (*Blockchain) ValidatorChecker ¶
func (bc *Blockchain) ValidatorChecker() validator.Writer
func (*Blockchain) ValidatorWriter ¶
func (bc *Blockchain) ValidatorWriter() validator.Writer
func (*Blockchain) Validators ¶
func (bc *Blockchain) Validators() validator.IterableReader
func (*Blockchain) ValidatorsHistory ¶
type BlockchainInfo ¶
type BlockchainInfo interface {
	GenesisHash() []byte
	GenesisDoc() genesis.GenesisDoc
	ChainID() string
	LastBlockHeight() uint64
	LastBlockTime() time.Time
	LastCommitTime() time.Time
	LastBlockHash() []byte
	AppHashAfterLastBlock() []byte
	Validators() validator.IterableReader
	ValidatorsHistory() (currentSet *validator.Set, deltas []*validator.Set, height uint64)
	NumValidators() int
}
    type PersistedState ¶
type PersistedState struct {
	AppHashAfterLastBlock []byte
	LastBlockHeight       uint64
	GenesisDoc            genesis.GenesisDoc
	ValidatorSet          []validator.Validator
	ValidatorCache        validator.PersistedRing
}
     Click to show internal directories. 
   Click to hide internal directories.