Documentation ¶
Index ¶
- Constants
- type Application
- func (app *Application) BeginBlock(reqBeginBlock types.RequestBeginBlock) types.ResponseBeginBlock
- func (app *Application) CheckTx(reqCheckTx types.RequestCheckTx) types.ResponseCheckTx
- func (app *Application) Commit() types.ResponseCommit
- func (app *Application) DeliverTx(reqDeliverTx types.RequestDeliverTx) types.ResponseDeliverTx
- func (app *Application) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock
- func (app *Application) Info(_ types.RequestInfo) types.ResponseInfo
- func (app *Application) InitChain(reqInitChain types.RequestInitChain) types.ResponseInitChain
- func (app *Application) Query(reqQuery types.RequestQuery) types.ResponseQuery
- func (app *Application) ValidateHeight(req types.RequestBeginBlock) bool
- type ContractCaller
- type DecodeTx
- type LastCommit
Constants ¶
View Source
const LastCommitKey = "lck"
View Source
const ValidatorSetChangePrefix string = "val:"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { types.BaseApplication // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication(caller ContractCaller, dbDir string) *Application
func (*Application) BeginBlock ¶
func (app *Application) BeginBlock(reqBeginBlock types.RequestBeginBlock) types.ResponseBeginBlock
BeginBlock determines whether there is a Byzantine evidence, and punishes the specified validator
func (*Application) CheckTx ¶
func (app *Application) CheckTx(reqCheckTx types.RequestCheckTx) types.ResponseCheckTx
func (*Application) Commit ¶
func (app *Application) Commit() types.ResponseCommit
func (*Application) DeliverTx ¶
func (app *Application) DeliverTx(reqDeliverTx types.RequestDeliverTx) types.ResponseDeliverTx
func (*Application) EndBlock ¶
func (app *Application) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock
EndBlock updates the validator set
func (*Application) Info ¶
func (app *Application) Info(_ types.RequestInfo) types.ResponseInfo
func (*Application) InitChain ¶
func (app *Application) InitChain(reqInitChain types.RequestInitChain) types.ResponseInitChain
func (*Application) Query ¶
func (app *Application) Query(reqQuery types.RequestQuery) types.ResponseQuery
Query does not check signature
func (*Application) ValidateHeight ¶
func (app *Application) ValidateHeight(req types.RequestBeginBlock) bool
type ContractCaller ¶
type ContractCaller interface { // CallContract sends message to the specified contract container and waits for response CallContract(cId string, args [][]byte) (*pb.ContractOutput, error) // QueryContractList gets all installed contacts QueryContractList() []string }
ContractCaller chats with contracts
type DecodeTx ¶
type LastCommit ¶
Click to show internal directories.
Click to hide internal directories.