Documentation ¶
Index ¶
- func ConvertTxQcpResult(txQcpResult interface{}) (*txs.QcpTxResult, bool)
- func GetAccountMapper(ctx context.Context) *account.AccountMapper
- func GetQcpMapper(ctx context.Context) *qcp.QcpMapper
- func MakeQBaseCodec() *go_amino.Codec
- func RegisterCodec(cdc *go_amino.Codec)
- type BaseApp
- func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock)
- func (app *BaseApp) CheckTx(txBytes []byte) (res abci.ResponseCheckTx)
- func (app *BaseApp) Commit() (res abci.ResponseCommit)
- func (app *BaseApp) DeliverTx(txBytes []byte) (res abci.ResponseDeliverTx)
- func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock)
- func (app *BaseApp) GetCdc() *go_amino.Codec
- func (app *BaseApp) Info(req abci.RequestInfo) abci.ResponseInfo
- func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain)
- func (app *BaseApp) IsSealed() bool
- func (app *BaseApp) LastBlockHeight() int64
- func (app *BaseApp) LastCommitID() store.CommitID
- func (app *BaseApp) LoadLatestVersion() error
- func (app *BaseApp) LoadVersion(version int64) error
- func (app *BaseApp) Name() string
- func (app *BaseApp) NewContext(isCheckTx bool, header abci.Header) ctx.Context
- func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery)
- func (app *BaseApp) RegisterAccountProto(proto func() account.Account)
- func (app *BaseApp) RegisterCustomQueryHandler(handler CustomQueryHandler)
- func (app *BaseApp) RegisterMapper(mapper mapper.IMapper)
- func (app *BaseApp) RegisterTxQcpResultHandler(txQcpResultHandler TxQcpResultHandler)
- func (app *BaseApp) RegisterTxQcpSigner(signer crypto.PrivKey)
- func (app *BaseApp) Seal()
- func (app *BaseApp) SetBeginBlocker(beginBlocker BeginBlockHandler)
- func (app *BaseApp) SetCommitMultiStoreTracer(w io.Writer)
- func (app *BaseApp) SetEndBlocker(endBlocker EndBlockHandler)
- func (app *BaseApp) SetInitChainer(initChainer InitChainHandler)
- func (app *BaseApp) SetName(name string)
- func (app *BaseApp) SetOption(req abci.RequestSetOption) (res abci.ResponseSetOption)
- type BeginBlockHandler
- type CustomQueryHandler
- type EndBlockHandler
- type InitChainHandler
- type TxQcpResultHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertTxQcpResult ¶ added in v0.0.4
func ConvertTxQcpResult(txQcpResult interface{}) (*txs.QcpTxResult, bool)
see: handler.go: TxQcpResultHandler
func GetAccountMapper ¶ added in v0.0.4
func GetAccountMapper(ctx context.Context) *account.AccountMapper
func MakeQBaseCodec ¶ added in v0.0.2
func RegisterCodec ¶
Types ¶
type BaseApp ¶
type BaseApp struct { // initialized on creation Logger log.Logger // contains filtered or unexported fields }
BaseApp reflects the ABCI application implementation.
func NewBaseApp ¶
func NewBaseApp(name string, logger log.Logger, db dbm.DB, registerCodecFunc func(*go_amino.Codec), options ...func(*BaseApp)) *BaseApp
NewBaseApp returns a reference to an initialized BaseApp.
func (*BaseApp) BeginBlock ¶
func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock)
BeginBlock implements the ABCI application interface.
func (*BaseApp) CheckTx ¶
func (app *BaseApp) CheckTx(txBytes []byte) (res abci.ResponseCheckTx)
CheckTx implements ABCI CheckTx runs the "basic checks" to see whether or not a transaction can possibly be executed, first decoding, then the ante handler (which checks signatures/fees/ValidateBasic), then finally the route match to see whether a handler exists. CheckTx does not run the actual Msg handler function(s).
func (*BaseApp) DeliverTx ¶
func (app *BaseApp) DeliverTx(txBytes []byte) (res abci.ResponseDeliverTx)
Implements ABCI
func (*BaseApp) EndBlock ¶
func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock)
EndBlock implements the ABCI application interface.
func (*BaseApp) Info ¶
func (app *BaseApp) Info(req abci.RequestInfo) abci.ResponseInfo
Implements ABCI
func (*BaseApp) InitChain ¶
func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain)
Implements ABCI InitChain runs the initialization logic directly on the CommitMultiStore and commits it.
func (*BaseApp) LastBlockHeight ¶
the last committed block height
func (*BaseApp) LastCommitID ¶
the last CommitID of the multistore
func (*BaseApp) LoadLatestVersion ¶
load latest application version
func (*BaseApp) LoadVersion ¶
load application version
func (*BaseApp) NewContext ¶
NewContext returns a new Context with the correct store, the given header, and nil txBytes.
func (*BaseApp) Query ¶
func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery)
Implements ABCI. Delegates to CommitMultiStore if it implements Queryable
func (*BaseApp) RegisterAccountProto ¶
RegisterQcpMapper 注册AccountMapper
func (*BaseApp) RegisterCustomQueryHandler ¶ added in v0.0.2
func (app *BaseApp) RegisterCustomQueryHandler(handler CustomQueryHandler)
func (*BaseApp) RegisterMapper ¶
func (*BaseApp) RegisterTxQcpResultHandler ¶
func (app *BaseApp) RegisterTxQcpResultHandler(txQcpResultHandler TxQcpResultHandler)
func (*BaseApp) RegisterTxQcpSigner ¶ added in v0.0.2
func (*BaseApp) SetBeginBlocker ¶
func (app *BaseApp) SetBeginBlocker(beginBlocker BeginBlockHandler)
func (*BaseApp) SetCommitMultiStoreTracer ¶
SetCommitMultiStoreTracer sets the store tracer on the BaseApp's underlying CommitMultiStore.
func (*BaseApp) SetEndBlocker ¶
func (app *BaseApp) SetEndBlocker(endBlocker EndBlockHandler)
func (*BaseApp) SetInitChainer ¶
func (app *BaseApp) SetInitChainer(initChainer InitChainHandler)
func (*BaseApp) SetOption ¶
func (app *BaseApp) SetOption(req abci.RequestSetOption) (res abci.ResponseSetOption)
Implements ABCI
type BeginBlockHandler ¶
type BeginBlockHandler func(ctx ctx.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
run code before the transactions in a block
type CustomQueryHandler ¶ added in v0.0.2
type CustomQueryHandler func(ctx ctx.Context, route []string, req abci.RequestQuery) (res []byte, err types.Error)
------------------------------------------------------------------------------------------------------------------------- CustomQueryHandler 自定义路径查询 ex: path: "/custom/qcp/a/b/c": 调用app.RegisterCustomQueryHandler(handler) handler中route为切片:[qcp,a,b,c]
type EndBlockHandler ¶
type EndBlockHandler func(ctx ctx.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
run code after the transactions in a block and return updates to the validator set
type InitChainHandler ¶
type InitChainHandler func(ctx ctx.Context, req abci.RequestInitChain) abci.ResponseInitChain
initialize application state at genesis