Documentation ¶
Index ¶
- Constants
- type Blockchain
- func (app *Blockchain) BeginBlock(req abciTypes.RequestBeginBlock) abciTypes.ResponseBeginBlock
- func (app *Blockchain) CheckTx(req abciTypes.RequestCheckTx) abciTypes.ResponseCheckTx
- func (app *Blockchain) Commit() abciTypes.ResponseCommit
- func (app *Blockchain) CurrentState() *state.CheckState
- func (app *Blockchain) DeleteStateVersions(from, to int64) error
- func (app *Blockchain) DeliverTx(req abciTypes.RequestDeliverTx) abciTypes.ResponseDeliverTx
- func (app *Blockchain) EndBlock(req abciTypes.RequestEndBlock) abciTypes.ResponseEndBlock
- func (app *Blockchain) GetBlocksTimeDelta(height, count uint64) (int, error)
- func (app *Blockchain) GetEventsDB() eventsdb.IEventsDB
- func (app *Blockchain) GetStateForHeight(height uint64) (*state.CheckState, error)
- func (app *Blockchain) GetValidatorStatus(address types.TmAddress) int8
- func (app *Blockchain) Height() uint64
- func (app *Blockchain) Info(req abciTypes.RequestInfo) (resInfo abciTypes.ResponseInfo)
- func (app *Blockchain) InitChain(req abciTypes.RequestInitChain) abciTypes.ResponseInitChain
- func (app *Blockchain) MinGasPrice() uint32
- func (app *Blockchain) Query(reqQuery abciTypes.RequestQuery) abciTypes.ResponseQuery
- func (app *Blockchain) SetBlocksTimeDelta(height uint64, value int)
- func (app *Blockchain) SetOption(req abciTypes.RequestSetOption) abciTypes.ResponseSetOption
- func (app *Blockchain) SetStatisticData(statisticData *statistics.Data) *statistics.Data
- func (app *Blockchain) SetTmNode(node *tmNode.Node)
- func (app *Blockchain) StatisticData() *statistics.Data
- func (app *Blockchain) Stop()
Constants ¶
const ( ValidatorPresent = 1 ValidatorAbsent = 2 )
Statuses of validators
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockchain ¶
type Blockchain struct { abciTypes.BaseApplication // contains filtered or unexported fields }
Blockchain is a main structure of Minter
func NewMinterBlockchain ¶
func NewMinterBlockchain(cfg *config.Config) *Blockchain
NewMinterBlockchain creates Minter Blockchain instance, should be only called once
func (*Blockchain) BeginBlock ¶
func (app *Blockchain) BeginBlock(req abciTypes.RequestBeginBlock) abciTypes.ResponseBeginBlock
BeginBlock signals the beginning of a block.
func (*Blockchain) CheckTx ¶
func (app *Blockchain) CheckTx(req abciTypes.RequestCheckTx) abciTypes.ResponseCheckTx
CheckTx validates a tx for the mempool
func (*Blockchain) Commit ¶
func (app *Blockchain) Commit() abciTypes.ResponseCommit
Commit the state and return the application Merkle root hash
func (*Blockchain) CurrentState ¶
func (app *Blockchain) CurrentState() *state.CheckState
CurrentState returns immutable state of Minter Blockchain
func (*Blockchain) DeleteStateVersions ¶ added in v1.2.0
func (app *Blockchain) DeleteStateVersions(from, to int64) error
DeleteStateVersions deletes states in given range
func (*Blockchain) DeliverTx ¶
func (app *Blockchain) DeliverTx(req abciTypes.RequestDeliverTx) abciTypes.ResponseDeliverTx
DeliverTx deliver a tx for full processing
func (*Blockchain) EndBlock ¶
func (app *Blockchain) EndBlock(req abciTypes.RequestEndBlock) abciTypes.ResponseEndBlock
EndBlock signals the end of a block, returns changes to the validator set
func (*Blockchain) GetBlocksTimeDelta ¶ added in v0.12.1
func (app *Blockchain) GetBlocksTimeDelta(height, count uint64) (int, error)
GetBlocksTimeDelta returns current blocks time delta
func (*Blockchain) GetEventsDB ¶ added in v1.1.0
func (app *Blockchain) GetEventsDB() eventsdb.IEventsDB
GetEventsDB returns current EventsDB
func (*Blockchain) GetStateForHeight ¶
func (app *Blockchain) GetStateForHeight(height uint64) (*state.CheckState, error)
GetStateForHeight returns immutable state of Minter Blockchain for given height
func (*Blockchain) GetValidatorStatus ¶ added in v1.1.6
func (app *Blockchain) GetValidatorStatus(address types.TmAddress) int8
GetValidatorStatus returns given validator's status
func (*Blockchain) Height ¶
func (app *Blockchain) Height() uint64
Height returns current height of Minter Blockchain
func (*Blockchain) Info ¶
func (app *Blockchain) Info(req abciTypes.RequestInfo) (resInfo abciTypes.ResponseInfo)
Info return application info. Used for synchronization between Tendermint and Minter
func (*Blockchain) InitChain ¶
func (app *Blockchain) InitChain(req abciTypes.RequestInitChain) abciTypes.ResponseInitChain
InitChain initialize blockchain with validators and other info. Only called once.
func (*Blockchain) MinGasPrice ¶ added in v0.10.0
func (app *Blockchain) MinGasPrice() uint32
MinGasPrice returns minimal acceptable gas price
func (*Blockchain) Query ¶
func (app *Blockchain) Query(reqQuery abciTypes.RequestQuery) abciTypes.ResponseQuery
Query Unused method, required by Tendermint
func (*Blockchain) SetBlocksTimeDelta ¶ added in v0.12.1
func (app *Blockchain) SetBlocksTimeDelta(height uint64, value int)
SetBlocksTimeDelta sets current blocks time delta
func (*Blockchain) SetOption ¶
func (app *Blockchain) SetOption(req abciTypes.RequestSetOption) abciTypes.ResponseSetOption
SetOption Unused method, required by Tendermint
func (*Blockchain) SetStatisticData ¶ added in v1.1.4
func (app *Blockchain) SetStatisticData(statisticData *statistics.Data) *statistics.Data
SetStatisticData used for collection statistics about blockchain operations
func (*Blockchain) SetTmNode ¶ added in v0.9.0
func (app *Blockchain) SetTmNode(node *tmNode.Node)
SetTmNode sets Tendermint node
func (*Blockchain) StatisticData ¶ added in v1.1.4
func (app *Blockchain) StatisticData() *statistics.Data
StatisticData used for collection statistics about blockchain operations
func (*Blockchain) Stop ¶
func (app *Blockchain) Stop()
Stop gracefully stopping Minter Blockchain instance