Documentation ¶
Index ¶
- Constants
- type Blockchain
- func (app *Blockchain) BeginBlock(req abciTypes.RequestBeginBlock) abciTypes.ResponseBeginBlock
- func (app *Blockchain) CheckTx(rawTx []byte) abciTypes.ResponseCheckTx
- func (app *Blockchain) Commit() abciTypes.ResponseCommit
- func (app *Blockchain) CurrentState() *state.StateDB
- func (app *Blockchain) DeliverTx(rawTx []byte) abciTypes.ResponseDeliverTx
- func (app *Blockchain) EndBlock(req abciTypes.RequestEndBlock) abciTypes.ResponseEndBlock
- func (app *Blockchain) GetBlocksTimeDelta(height, count int64) (int, error)
- func (app *Blockchain) GetStateForHeight(height int) (*state.StateDB, error)
- func (app *Blockchain) Height() int64
- func (app *Blockchain) Info(req abciTypes.RequestInfo) (resInfo abciTypes.ResponseInfo)
- func (app *Blockchain) InitChain(req abciTypes.RequestInitChain) abciTypes.ResponseInitChain
- func (app *Blockchain) LastCommittedHeight() int64
- func (app *Blockchain) MinGasPrice() *big.Int
- func (app *Blockchain) Query(reqQuery abciTypes.RequestQuery) abciTypes.ResponseQuery
- func (app *Blockchain) SetBlocksTimeDelta(height int64, value int)
- func (app *Blockchain) SetOption(req abciTypes.RequestSetOption) abciTypes.ResponseSetOption
- func (app *Blockchain) SetTmNode(node *tmNode.Node)
- func (app *Blockchain) Stop()
Constants ¶
const ( // Global validator's statuses ValidatorPresent = 1 ValidatorAbsent = 2 BlockMaxBytes = 10000000 DefaultMaxGas = 100000 MinMaxGas = 5000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockchain ¶
type Blockchain struct { abciTypes.BaseApplication // contains filtered or unexported fields }
Main structure of Minter Blockchain
func NewMinterBlockchain ¶
func NewMinterBlockchain() *Blockchain
Creates Minter Blockchain instance, should be only called once
func (*Blockchain) BeginBlock ¶
func (app *Blockchain) BeginBlock(req abciTypes.RequestBeginBlock) abciTypes.ResponseBeginBlock
Signals the beginning of a block.
func (*Blockchain) CheckTx ¶
func (app *Blockchain) CheckTx(rawTx []byte) abciTypes.ResponseCheckTx
Validate 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.StateDB
Get immutable state of Minter Blockchain
func (*Blockchain) DeliverTx ¶
func (app *Blockchain) DeliverTx(rawTx []byte) abciTypes.ResponseDeliverTx
Deliver a tx for full processing
func (*Blockchain) EndBlock ¶
func (app *Blockchain) EndBlock(req abciTypes.RequestEndBlock) abciTypes.ResponseEndBlock
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 int64) (int, error)
func (*Blockchain) GetStateForHeight ¶
func (app *Blockchain) GetStateForHeight(height int) (*state.StateDB, error)
Get immutable state of Minter Blockchain for given height
func (*Blockchain) Height ¶
func (app *Blockchain) Height() int64
Get current height of Minter Blockchain
func (*Blockchain) Info ¶
func (app *Blockchain) Info(req abciTypes.RequestInfo) (resInfo abciTypes.ResponseInfo)
Return application info. Used for synchronization between Tendermint and Minter
func (*Blockchain) InitChain ¶
func (app *Blockchain) InitChain(req abciTypes.RequestInitChain) abciTypes.ResponseInitChain
Initialize blockchain with validators and other info. Only called once.
func (*Blockchain) LastCommittedHeight ¶ added in v0.7.5
func (app *Blockchain) LastCommittedHeight() int64
Get last committed height of Minter Blockchain
func (*Blockchain) MinGasPrice ¶ added in v0.10.0
func (app *Blockchain) MinGasPrice() *big.Int
Get minimal acceptable gas price
func (*Blockchain) Query ¶
func (app *Blockchain) Query(reqQuery abciTypes.RequestQuery) abciTypes.ResponseQuery
Unused method, required by Tendermint
func (*Blockchain) SetBlocksTimeDelta ¶ added in v0.12.1
func (app *Blockchain) SetBlocksTimeDelta(height int64, value int)
func (*Blockchain) SetOption ¶
func (app *Blockchain) SetOption(req abciTypes.RequestSetOption) abciTypes.ResponseSetOption
Unused method, required by Tendermint
func (*Blockchain) SetTmNode ¶ added in v0.9.0
func (app *Blockchain) SetTmNode(node *tmNode.Node)
Set Tendermint node
func (*Blockchain) Stop ¶
func (app *Blockchain) Stop()
Gracefully stopping Minter Blockchain instance