Documentation ¶
Overview ¶
nolint
Index ¶
- Constants
- type Context
- func (c Context) BlockHeader() abci.Header
- func (c Context) BlockHeight() int64
- func (c Context) BlockTxIndex() int64
- func (c Context) CacheContext() (cc Context, writeCache func())
- func (c Context) ChainID() string
- func (c Context) ConsensusParams() *abci.ConsensusParams
- func (c Context) EventManager() *types.EventManager
- func (c Context) GasMeter() types.GasMeter
- func (c Context) GetOp(ver int64) (Op, bool)
- func (c Context) IsCheckTx() bool
- func (c Context) IsZero() bool
- func (c Context) KVStore(key store.StoreKey) store.KVStore
- func (c Context) Logger() log.Logger
- func (c Context) Mapper(name string) mapper.IMapper
- func (c Context) MinimumFees() []types.Coin
- func (c Context) MultiStore() store.MultiStore
- func (c Context) ResetBlockTxIndex() Context
- func (c Context) TransientStore(key store.StoreKey) store.KVStore
- func (c Context) TxBytes() []byte
- func (c Context) TxQcpResultHandler() func(ctx Context, itx interface{})
- func (c Context) Value(key interface{}) interface{}
- func (c Context) VoteInfos() []abci.VoteInfo
- func (c Context) WithBlockGasMeter(meter types.GasMeter) Context
- func (c Context) WithBlockHeader(header abci.Header) Context
- func (c Context) WithBlockHeight(height int64) Context
- func (c Context) WithBlockTime(newTime time.Time) Context
- func (c Context) WithBlockTxIndex(blockTxIndex int64) Context
- func (c Context) WithCacheWrapper(key interface{}, value store.CacheWrapper) Context
- func (c Context) WithChainID(chainID string) Context
- func (c Context) WithCloner(key interface{}, value cloner) Context
- func (c Context) WithConsensusParams(params *abci.ConsensusParams) Context
- func (c Context) WithEventManager(em *types.EventManager) Context
- func (c Context) WithGasMeter(meter types.GasMeter) Context
- func (c Context) WithInt32(key interface{}, value int32) Context
- func (c Context) WithIsCheckTx(isCheckTx bool) Context
- func (c Context) WithLogger(logger log.Logger) Context
- func (c Context) WithMinimumFees(minFees []types.Coin) Context
- func (c Context) WithMultiStore(ms store.MultiStore) Context
- func (c Context) WithProposer(addr types.ConsAddress) Context
- func (c Context) WithProtoMsg(key interface{}, value proto.Message) Context
- func (c Context) WithString(key interface{}, value string) Context
- func (c Context) WithTxBytes(txBytes []byte) Context
- func (c Context) WithTxQcpResultHandler(txQcpResultHandler func(ctx Context, itx interface{})) Context
- func (c Context) WithUint32(key interface{}, value uint32) Context
- func (c Context) WithUint64(key interface{}, value uint64) Context
- func (c Context) WithValue(key interface{}, value interface{}) Context
- func (c Context) WithVoteInfos(VoteInfos []abci.VoteInfo) Context
- type Op
Constants ¶
const ContextKeySigners contextKey = 99999
ContextKeySigners 用于保存tx中签名的账户
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
The intent of Context is for it to be an immutable object that can be cloned and updated cheaply with WithValue() and passed forward to the next decorator or handler. For example,
func MsgHandler(ctx Context, tx Tx) Result { ... ctx = ctx.WithValue(key, value) ... }
func NewContext ¶
func NewContext(ms store.MultiStore, header abci.Header, isCheckTx bool, logger log.Logger, registSeedMapper map[string]mapper.IMapper) Context
create a new context nolint: unparam
func (Context) BlockHeader ¶
func (Context) BlockHeight ¶
func (Context) BlockTxIndex ¶
func (Context) CacheContext ¶
Cache the multistore and return a new cached context. The cached context is written to the context when writeCache is called.
func (Context) ConsensusParams ¶
func (c Context) ConsensusParams() *abci.ConsensusParams
func (Context) EventManager ¶ added in v0.2.2
func (c Context) EventManager() *types.EventManager
func (Context) GetOp ¶
Returns false if ver <= 0 || ver > len(c.pst.ops). The first operation is version 1.
func (Context) MinimumFees ¶
func (Context) MultiStore ¶ added in v0.0.10
func (c Context) MultiStore() store.MultiStore
NOTE: Do not expose MultiStore. MultiStore exposes all the keys. Instead, pass the context and the store key.
func (Context) ResetBlockTxIndex ¶
func (Context) TransientStore ¶
TransientStore fetches a TransientStore from the MultiStore.
func (Context) TxQcpResultHandler ¶
func (Context) Value ¶
func (c Context) Value(key interface{}) interface{}
context value for the provided key
func (Context) WithBlockGasMeter ¶ added in v0.0.10
func (Context) WithBlockHeight ¶
func (Context) WithBlockTime ¶ added in v0.0.10
func (Context) WithBlockTxIndex ¶
func (Context) WithCacheWrapper ¶
func (c Context) WithCacheWrapper(key interface{}, value store.CacheWrapper) Context
func (Context) WithChainID ¶
func (Context) WithCloner ¶
func (Context) WithConsensusParams ¶
func (c Context) WithConsensusParams(params *abci.ConsensusParams) Context
func (Context) WithEventManager ¶ added in v0.2.2
func (c Context) WithEventManager(em *types.EventManager) Context
func (Context) WithIsCheckTx ¶
func (Context) WithMultiStore ¶
func (c Context) WithMultiStore(ms store.MultiStore) Context
func (Context) WithProposer ¶ added in v0.0.10
func (c Context) WithProposer(addr types.ConsAddress) Context