Documentation
¶
Index ¶
- type Application
- type BaseApplication
- func (BaseApplication) ApplySnapshotChunk(req *t.RequestApplySnapshotChunk) *t.ResponseApplySnapshotChunk
- func (BaseApplication) BeginBlock(req *RequestNativeBeginBlock) *t.ResponseBeginBlock
- func (BaseApplication) CheckTx(req *RequestNativeCheckTx) *ResponseNativeCheckTx
- func (BaseApplication) Commit() *t.ResponseCommit
- func (BaseApplication) DeliverTx(req *RequestNativeDeliverTx) *t.ResponseDeliverTx
- func (BaseApplication) EndBlock(req *t.RequestEndBlock) *ResponseNativeEndBlock
- func (BaseApplication) Info(req *t.RequestInfo) *t.ResponseInfo
- func (BaseApplication) InitLedger(req *RequestNativeInitLedger) *ResponseNativeInitLedger
- func (BaseApplication) ListSnapshots(req *t.RequestListSnapshots) *t.ResponseListSnapshots
- func (BaseApplication) LoadSnapshotChunk(req *t.RequestLoadSnapshotChunk) *t.ResponseLoadSnapshotChunk
- func (BaseApplication) OfferSnapshot(req *t.RequestOfferSnapshot) *t.ResponseOfferSnapshot
- func (BaseApplication) Query(req *t.RequestQuery) *t.ResponseQuery
- type RequestNativeBeginBlock
- type RequestNativeCheckTx
- type RequestNativeDeliverTx
- type RequestNativeInitLedger
- func (m *RequestNativeInitLedger) GetAppStateBytes() []byte
- func (m *RequestNativeInitLedger) GetExtra() model.ExtraPtr
- func (m *RequestNativeInitLedger) GetInitialHeight() uint64
- func (m *RequestNativeInitLedger) GetLedgerId() model.LedgerID
- func (m *RequestNativeInitLedger) GetTime() time.Time
- func (m *RequestNativeInitLedger) Reset()
- type ResponseNativeCheckTx
- func (m *ResponseNativeCheckTx) GetCode() uint32
- func (m *ResponseNativeCheckTx) GetCodespace() string
- func (m *ResponseNativeCheckTx) GetData() []byte
- func (m *ResponseNativeCheckTx) GetEvents() []types.Event
- func (m *ResponseNativeCheckTx) GetGasUsed() int64
- func (m *ResponseNativeCheckTx) GetGasWanted() int64
- func (m *ResponseNativeCheckTx) GetInfo() string
- func (m *ResponseNativeCheckTx) GetLog() string
- func (m *ResponseNativeCheckTx) GetMempoolError() error
- func (m *ResponseNativeCheckTx) GetPriority() int64
- func (m *ResponseNativeCheckTx) GetSender() model.Address
- func (m *ResponseNativeCheckTx) Reset()
- type ResponseNativeEndBlock
- type ResponseNativeInitLedger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { // Info/Query Connection Info(*t.RequestInfo) *t.ResponseInfo // Return application info Query(*t.RequestQuery) *t.ResponseQuery // Query for state // Mempool Connection CheckTx(*RequestNativeCheckTx) *ResponseNativeCheckTx // Validate a tx for the mempool // Consensus Connection InitLedger(*RequestNativeInitLedger) *ResponseNativeInitLedger // Initialize distributed ledger w/ validators/other info from the consensus engine BeginBlock(*RequestNativeBeginBlock) *t.ResponseBeginBlock // Signals the beginning of a block DeliverTx(*RequestNativeDeliverTx) *t.ResponseDeliverTx // Deliver a tx for full processing EndBlock(*t.RequestEndBlock) *ResponseNativeEndBlock // Signals the end of a block, returns changes to the validator set Commit() *t.ResponseCommit // Commit the state and return the application Merkle root hash // State Sync Connection ListSnapshots(*t.RequestListSnapshots) *t.ResponseListSnapshots // List available snapshots OfferSnapshot(*t.RequestOfferSnapshot) *t.ResponseOfferSnapshot // Offer a snapshot to the application LoadSnapshotChunk(*t.RequestLoadSnapshotChunk) *t.ResponseLoadSnapshotChunk // Load a snapshot chunk ApplySnapshotChunk(*t.RequestApplySnapshotChunk) *t.ResponseApplySnapshotChunk // Apply a shapshot chunk }
Application interface is a process-local version of the types.Application interface whose methods take a pointer argument and return a pointer to avoid copying, some methods also take a RequestNativeXxx argument and/or return a ResponseNativeXxx argument, which directly use Go-native types form go-doubl instead of corresponding Protocol Buffers types.
type BaseApplication ¶
type BaseApplication struct { }
func NewBaseApplication ¶
func NewBaseApplication() *BaseApplication
func (BaseApplication) ApplySnapshotChunk ¶
func (BaseApplication) ApplySnapshotChunk( req *t.RequestApplySnapshotChunk) *t.ResponseApplySnapshotChunk
func (BaseApplication) BeginBlock ¶
func (BaseApplication) BeginBlock(req *RequestNativeBeginBlock) *t.ResponseBeginBlock
func (BaseApplication) CheckTx ¶
func (BaseApplication) CheckTx(req *RequestNativeCheckTx) *ResponseNativeCheckTx
func (BaseApplication) Commit ¶
func (BaseApplication) Commit() *t.ResponseCommit
func (BaseApplication) DeliverTx ¶
func (BaseApplication) DeliverTx(req *RequestNativeDeliverTx) *t.ResponseDeliverTx
func (BaseApplication) EndBlock ¶
func (BaseApplication) EndBlock(req *t.RequestEndBlock) *ResponseNativeEndBlock
func (BaseApplication) Info ¶
func (BaseApplication) Info(req *t.RequestInfo) *t.ResponseInfo
func (BaseApplication) InitLedger ¶
func (BaseApplication) InitLedger(req *RequestNativeInitLedger) *ResponseNativeInitLedger
func (BaseApplication) ListSnapshots ¶
func (BaseApplication) ListSnapshots(req *t.RequestListSnapshots) *t.ResponseListSnapshots
func (BaseApplication) LoadSnapshotChunk ¶
func (BaseApplication) LoadSnapshotChunk(req *t.RequestLoadSnapshotChunk) *t.ResponseLoadSnapshotChunk
func (BaseApplication) OfferSnapshot ¶
func (BaseApplication) OfferSnapshot(req *t.RequestOfferSnapshot) *t.ResponseOfferSnapshot
func (BaseApplication) Query ¶
func (BaseApplication) Query(req *t.RequestQuery) *t.ResponseQuery
type RequestNativeBeginBlock ¶
type RequestNativeBeginBlock struct { Header *model.BlockHeaderExt Extra model.ExtraPtr }
func (*RequestNativeBeginBlock) GetExtra ¶
func (m *RequestNativeBeginBlock) GetExtra() model.ExtraPtr
func (*RequestNativeBeginBlock) GetHash ¶
func (m *RequestNativeBeginBlock) GetHash() model.BlockHash
func (*RequestNativeBeginBlock) GetHeader ¶
func (m *RequestNativeBeginBlock) GetHeader() *model.BlockHeaderExt
func (*RequestNativeBeginBlock) Reset ¶
func (m *RequestNativeBeginBlock) Reset()
type RequestNativeCheckTx ¶
type RequestNativeCheckTx struct { Tx *model.TransactionExt Type types.CheckTxType }
func (*RequestNativeCheckTx) GetTx ¶
func (m *RequestNativeCheckTx) GetTx() *model.TransactionExt
func (*RequestNativeCheckTx) GetType ¶
func (m *RequestNativeCheckTx) GetType() types.CheckTxType
func (*RequestNativeCheckTx) Reset ¶
func (m *RequestNativeCheckTx) Reset()
type RequestNativeDeliverTx ¶
type RequestNativeDeliverTx struct {
Tx *model.TransactionExt
}
func (*RequestNativeDeliverTx) GetTx ¶
func (m *RequestNativeDeliverTx) GetTx() *model.TransactionExt
func (*RequestNativeDeliverTx) Reset ¶
func (m *RequestNativeDeliverTx) Reset()
type RequestNativeInitLedger ¶
type RequestNativeInitLedger struct { Time time.Time LedgerId model.LedgerID AppStateBytes []byte InitialHeight uint64 Extra model.ExtraPtr }
func (*RequestNativeInitLedger) GetAppStateBytes ¶
func (m *RequestNativeInitLedger) GetAppStateBytes() []byte
func (*RequestNativeInitLedger) GetExtra ¶
func (m *RequestNativeInitLedger) GetExtra() model.ExtraPtr
func (*RequestNativeInitLedger) GetInitialHeight ¶
func (m *RequestNativeInitLedger) GetInitialHeight() uint64
func (*RequestNativeInitLedger) GetLedgerId ¶
func (m *RequestNativeInitLedger) GetLedgerId() model.LedgerID
func (*RequestNativeInitLedger) GetTime ¶
func (m *RequestNativeInitLedger) GetTime() time.Time
func (*RequestNativeInitLedger) Reset ¶
func (m *RequestNativeInitLedger) Reset()
type ResponseNativeCheckTx ¶
type ResponseNativeCheckTx struct { Code uint32 Data []byte Log string Info string GasWanted int64 GasUsed int64 Events []types.Event Codespace string Sender model.Address Priority int64 // mempool_error is set by the SMRE. // ACEI applications creating a ResponseCheckTX should not set mempool_error. MempoolError error }
func (*ResponseNativeCheckTx) GetCode ¶
func (m *ResponseNativeCheckTx) GetCode() uint32
func (*ResponseNativeCheckTx) GetCodespace ¶
func (m *ResponseNativeCheckTx) GetCodespace() string
func (*ResponseNativeCheckTx) GetData ¶
func (m *ResponseNativeCheckTx) GetData() []byte
func (*ResponseNativeCheckTx) GetEvents ¶
func (m *ResponseNativeCheckTx) GetEvents() []types.Event
func (*ResponseNativeCheckTx) GetGasUsed ¶
func (m *ResponseNativeCheckTx) GetGasUsed() int64
func (*ResponseNativeCheckTx) GetGasWanted ¶
func (m *ResponseNativeCheckTx) GetGasWanted() int64
func (*ResponseNativeCheckTx) GetInfo ¶
func (m *ResponseNativeCheckTx) GetInfo() string
func (*ResponseNativeCheckTx) GetLog ¶
func (m *ResponseNativeCheckTx) GetLog() string
func (*ResponseNativeCheckTx) GetMempoolError ¶
func (m *ResponseNativeCheckTx) GetMempoolError() error
func (*ResponseNativeCheckTx) GetPriority ¶
func (m *ResponseNativeCheckTx) GetPriority() int64
func (*ResponseNativeCheckTx) GetSender ¶
func (m *ResponseNativeCheckTx) GetSender() model.Address
func (*ResponseNativeCheckTx) Reset ¶
func (m *ResponseNativeCheckTx) Reset()
type ResponseNativeEndBlock ¶
func (*ResponseNativeEndBlock) GetEvents ¶
func (m *ResponseNativeEndBlock) GetEvents() []types.Event
func (*ResponseNativeEndBlock) GetExtra ¶
func (m *ResponseNativeEndBlock) GetExtra() model.ExtraPtr
func (*ResponseNativeEndBlock) Reset ¶
func (m *ResponseNativeEndBlock) Reset()
type ResponseNativeInitLedger ¶
func (*ResponseNativeInitLedger) GetAppHash ¶
func (m *ResponseNativeInitLedger) GetAppHash() []byte
func (*ResponseNativeInitLedger) GetExtra ¶
func (m *ResponseNativeInitLedger) GetExtra() model.ExtraPtr
func (*ResponseNativeInitLedger) Reset ¶
func (m *ResponseNativeInitLedger) Reset()
Click to show internal directories.
Click to hide internal directories.