Documentation ¶
Index ¶
- Variables
- type Block
- type BlockStore
- type Blockchain
- func (bc *Blockchain) AppHashAfterLastBlock() []byte
- func (bc *Blockchain) BlockHash(height uint64) ([]byte, error)
- func (bc *Blockchain) ChainID() string
- func (bc *Blockchain) CommitBlock(blockTime time.Time, blockHash, appHash []byte) error
- func (bc *Blockchain) CommitBlockAtHeight(blockTime time.Time, blockHash, appHash []byte, height uint64) error
- func (bc *Blockchain) CommitWithAppHash(appHash []byte) error
- func (bc *Blockchain) Encode() ([]byte, error)
- func (bc *Blockchain) GenesisDoc() genesis.GenesisDoc
- func (bc *Blockchain) GenesisHash() []byte
- func (bc *Blockchain) GetBlockHeader(height uint64) (*types.Header, error)
- func (bc *Blockchain) LastBlockHash() []byte
- func (bc *Blockchain) LastBlockHeight() uint64
- func (bc *Blockchain) LastBlockTime() time.Time
- func (bc *Blockchain) LastCommitDuration() time.Duration
- func (bc *Blockchain) LastCommitTime() time.Time
- func (bc *Blockchain) SetBlockStore(bs *BlockStore)
- type BlockchainInfo
- type PersistedState
- func (*PersistedState) Descriptor() ([]byte, []int)
- func (m *PersistedState) GetLastBlockHeight() uint64
- func (m *PersistedState) GetLastBlockTime() time.Time
- func (m *PersistedState) Marshal() (dAtA []byte, err error)
- func (m *PersistedState) MarshalTo(dAtA []byte) (int, error)
- func (*PersistedState) ProtoMessage()
- func (m *PersistedState) Reset()
- func (m *PersistedState) Size() (n int)
- func (m *PersistedState) String() string
- func (m *PersistedState) Unmarshal(dAtA []byte) error
- func (m *PersistedState) XXX_DiscardUnknown()
- func (m *PersistedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PersistedState) XXX_Merge(src proto.Message)
- func (*PersistedState) XXX_MessageName() string
- func (m *PersistedState) XXX_Size() int
- func (m *PersistedState) XXX_Unmarshal(b []byte) error
- type SyncInfo
- func (*SyncInfo) Descriptor() ([]byte, []int)
- func (m *SyncInfo) GetLatestBlockDuration() time.Duration
- func (m *SyncInfo) GetLatestBlockHeight() uint64
- func (m *SyncInfo) GetLatestBlockSeenTime() time.Time
- func (m *SyncInfo) GetLatestBlockTime() time.Time
- func (m *SyncInfo) Marshal() (dAtA []byte, err error)
- func (m *SyncInfo) MarshalTo(dAtA []byte) (int, error)
- func (*SyncInfo) ProtoMessage()
- func (m *SyncInfo) Reset()
- func (m *SyncInfo) Size() (n int)
- func (m *SyncInfo) String() string
- func (m *SyncInfo) Unmarshal(dAtA []byte) error
- func (m *SyncInfo) XXX_DiscardUnknown()
- func (m *SyncInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SyncInfo) XXX_Merge(src proto.Message)
- func (*SyncInfo) XXX_MessageName() string
- func (m *SyncInfo) XXX_Size() int
- func (m *SyncInfo) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthBcm = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBcm = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type BlockStore ¶ added in v0.24.0
type BlockStore struct { state.BlockStoreRPC // contains filtered or unexported fields }
func NewBlockExplorer ¶ added in v0.24.0
func NewBlockExplorer(dbBackendType dbm.DBBackendType, dbDir string) *BlockStore
func NewBlockStore ¶ added in v0.24.0
func NewBlockStore(blockStore state.BlockStoreRPC) *BlockStore
func (*BlockStore) Block ¶ added in v0.24.0
func (bs *BlockStore) Block(height int64) (_ *Block, err error)
type Blockchain ¶
func LoadOrNewBlockchain ¶
func LoadOrNewBlockchain(db dbm.DB, genesisDoc *genesis.GenesisDoc, logger *logging.Logger) (_ *Blockchain, exists bool, _ error)
LoadOrNewBlockchain returns true if state already exists
func NewBlockchain ¶ added in v0.23.3
func NewBlockchain(db dbm.DB, genesisDoc *genesis.GenesisDoc) *Blockchain
NewBlockchain returns a pointer to blockchain state initialised from genesis
func (*Blockchain) AppHashAfterLastBlock ¶
func (bc *Blockchain) AppHashAfterLastBlock() []byte
func (*Blockchain) BlockHash ¶ added in v0.24.0
func (bc *Blockchain) BlockHash(height uint64) ([]byte, error)
func (*Blockchain) ChainID ¶
func (bc *Blockchain) ChainID() string
func (*Blockchain) CommitBlock ¶
func (bc *Blockchain) CommitBlock(blockTime time.Time, blockHash, appHash []byte) error
func (*Blockchain) CommitBlockAtHeight ¶ added in v0.23.3
func (*Blockchain) CommitWithAppHash ¶ added in v0.25.0
func (bc *Blockchain) CommitWithAppHash(appHash []byte) error
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) GetBlockHeader ¶ added in v0.24.0
func (bc *Blockchain) GetBlockHeader(height uint64) (*types.Header, error)
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) LastCommitDuration ¶ added in v0.24.5
func (bc *Blockchain) LastCommitDuration() time.Duration
func (*Blockchain) LastCommitTime ¶ added in v0.20.1
func (bc *Blockchain) LastCommitTime() time.Time
func (*Blockchain) SetBlockStore ¶ added in v0.24.0
func (bc *Blockchain) SetBlockStore(bs *BlockStore)
type BlockchainInfo ¶
type BlockchainInfo interface { GenesisHash() []byte GenesisDoc() genesis.GenesisDoc ChainID() string LastBlockHeight() uint64 LastBlockTime() time.Time LastCommitTime() time.Time LastCommitDuration() time.Duration LastBlockHash() []byte AppHashAfterLastBlock() []byte // Gets the BlockHash at a height (or nil if no BlockStore mounted or block could not be found) BlockHash(height uint64) ([]byte, error) // GetBlockHash returns hash of the specific block GetBlockHeader(blockNumber uint64) (*types.Header, error) }
type PersistedState ¶
type PersistedState struct { AppHashAfterLastBlock github_com_hyperledger_burrow_binary.HexBytes `` /* 142-byte string literal not displayed */ LastBlockTime time.Time `protobuf:"bytes,2,opt,name=LastBlockTime,proto3,stdtime" json:"LastBlockTime"` LastBlockHeight uint64 `protobuf:"varint,3,opt,name=LastBlockHeight,proto3" json:"LastBlockHeight,omitempty"` GenesisHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,4,opt,name=GenesisHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"GenesisHash"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PersistedState) Descriptor ¶ added in v0.28.0
func (*PersistedState) Descriptor() ([]byte, []int)
func (*PersistedState) GetLastBlockHeight ¶ added in v0.28.0
func (m *PersistedState) GetLastBlockHeight() uint64
func (*PersistedState) GetLastBlockTime ¶ added in v0.28.0
func (m *PersistedState) GetLastBlockTime() time.Time
func (*PersistedState) Marshal ¶ added in v0.28.0
func (m *PersistedState) Marshal() (dAtA []byte, err error)
func (*PersistedState) MarshalTo ¶ added in v0.28.0
func (m *PersistedState) MarshalTo(dAtA []byte) (int, error)
func (*PersistedState) ProtoMessage ¶ added in v0.28.0
func (*PersistedState) ProtoMessage()
func (*PersistedState) Reset ¶ added in v0.28.0
func (m *PersistedState) Reset()
func (*PersistedState) Size ¶ added in v0.28.0
func (m *PersistedState) Size() (n int)
func (*PersistedState) String ¶ added in v0.28.0
func (m *PersistedState) String() string
func (*PersistedState) Unmarshal ¶ added in v0.28.0
func (m *PersistedState) Unmarshal(dAtA []byte) error
func (*PersistedState) XXX_DiscardUnknown ¶ added in v0.28.0
func (m *PersistedState) XXX_DiscardUnknown()
func (*PersistedState) XXX_Marshal ¶ added in v0.28.0
func (m *PersistedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PersistedState) XXX_Merge ¶ added in v0.28.0
func (m *PersistedState) XXX_Merge(src proto.Message)
func (*PersistedState) XXX_MessageName ¶ added in v0.28.0
func (*PersistedState) XXX_MessageName() string
func (*PersistedState) XXX_Size ¶ added in v0.28.0
func (m *PersistedState) XXX_Size() int
func (*PersistedState) XXX_Unmarshal ¶ added in v0.28.0
func (m *PersistedState) XXX_Unmarshal(b []byte) error
type SyncInfo ¶ added in v0.24.3
type SyncInfo struct { LatestBlockHeight uint64 `protobuf:"varint,1,opt,name=LatestBlockHeight,proto3" json:""` LatestBlockHash github_com_hyperledger_burrow_binary.HexBytes `` /* 130-byte string literal not displayed */ LatestAppHash github_com_hyperledger_burrow_binary.HexBytes `` /* 126-byte string literal not displayed */ // Timestamp of block as set by the block proposer LatestBlockTime time.Time `protobuf:"bytes,4,opt,name=LatestBlockTime,proto3,stdtime" json:"LatestBlockTime"` // Time at which we committed the last block LatestBlockSeenTime time.Time `protobuf:"bytes,5,opt,name=LatestBlockSeenTime,proto3,stdtime" json:"LatestBlockSeenTime"` // Time elapsed since last commit LatestBlockDuration time.Duration `protobuf:"bytes,6,opt,name=LatestBlockDuration,proto3,stdduration" json:"LatestBlockDuration"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func GetSyncInfo ¶ added in v0.24.3
func GetSyncInfo(blockchain BlockchainInfo) *SyncInfo
func (*SyncInfo) Descriptor ¶ added in v0.24.3
func (*SyncInfo) GetLatestBlockDuration ¶ added in v0.24.5
func (*SyncInfo) GetLatestBlockHeight ¶ added in v0.24.3
func (*SyncInfo) GetLatestBlockSeenTime ¶ added in v0.24.3
func (*SyncInfo) GetLatestBlockTime ¶ added in v0.24.3
func (*SyncInfo) ProtoMessage ¶ added in v0.24.3
func (*SyncInfo) ProtoMessage()
func (*SyncInfo) XXX_DiscardUnknown ¶ added in v0.24.3
func (m *SyncInfo) XXX_DiscardUnknown()
func (*SyncInfo) XXX_Marshal ¶ added in v0.24.3
func (*SyncInfo) XXX_MessageName ¶ added in v0.24.3
func (*SyncInfo) XXX_Unmarshal ¶ added in v0.24.3
Click to show internal directories.
Click to hide internal directories.