Documentation ¶
Overview ¶
* Trias abci :
this application implements the tendermint abci. @author vincent
Index ¶
- Constants
- func MakeValSetChangeTx(pubkey []byte, power uint64) []byte
- func SaveLastBlock(db dbm.DB, lastBlock LastBlockInfo)
- type LastBlockInfo
- type PersistentTriasCodeApplication
- func (app *PersistentTriasCodeApplication) BeginBlock(hash []byte, header *types.Header)
- func (app *PersistentTriasCodeApplication) CheckTx(tx []byte) types.Result
- func (app *PersistentTriasCodeApplication) Commit() types.Result
- func (app *PersistentTriasCodeApplication) DeliverTx(tx []byte) types.Result
- func (app *PersistentTriasCodeApplication) EndBlock(height uint64) (resEndBlock types.ResponseEndBlock)
- func (app *PersistentTriasCodeApplication) Info() (resInfo types.ResponseInfo)
- func (app *PersistentTriasCodeApplication) InitChain(validators []*types.Validator)
- func (app *PersistentTriasCodeApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery
- func (app *PersistentTriasCodeApplication) SetLogger(l log.Logger)
- func (app *PersistentTriasCodeApplication) SetOption(key string, value string) (log string)
- func (app *PersistentTriasCodeApplication) Validators() (validators []*types.Validator)
- type TriasCodeApplication
- func (app *TriasCodeApplication) CheckTx(tx []byte) types.Result
- func (app *TriasCodeApplication) Commit() types.Result
- func (app *TriasCodeApplication) DeliverTx(tx []byte) types.Result
- func (app *TriasCodeApplication) Info() (resInfo types.ResponseInfo)
- func (app *TriasCodeApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery)
Constants ¶
View Source
const ( TypeContract = "contract" TypeTransaction = "Vout" )
View Source
const (
ValidatorSetChangePrefix string = "val:"
)
Variables ¶
This section is empty.
Functions ¶
func MakeValSetChangeTx ¶
func SaveLastBlock ¶
func SaveLastBlock(db dbm.DB, lastBlock LastBlockInfo)
Types ¶
type LastBlockInfo ¶
func LoadLastBlock ¶
func LoadLastBlock(db dbm.DB) (lastBlock LastBlockInfo)
Get the last block from the db
type PersistentTriasCodeApplication ¶
type PersistentTriasCodeApplication struct {
// contains filtered or unexported fields
}
func NewPersistentTriasCodeApplication ¶
func NewPersistentTriasCodeApplication(dbDir string) *PersistentTriasCodeApplication
func (*PersistentTriasCodeApplication) BeginBlock ¶
func (app *PersistentTriasCodeApplication) BeginBlock(hash []byte, header *types.Header)
Track the block hash and header information
func (*PersistentTriasCodeApplication) CheckTx ¶
func (app *PersistentTriasCodeApplication) CheckTx(tx []byte) types.Result
func (*PersistentTriasCodeApplication) Commit ¶
func (app *PersistentTriasCodeApplication) Commit() types.Result
func (*PersistentTriasCodeApplication) DeliverTx ¶
func (app *PersistentTriasCodeApplication) DeliverTx(tx []byte) types.Result
tx is either "key=value" or just arbitrary bytes
func (*PersistentTriasCodeApplication) EndBlock ¶
func (app *PersistentTriasCodeApplication) EndBlock(height uint64) (resEndBlock types.ResponseEndBlock)
Update the validator set
func (*PersistentTriasCodeApplication) Info ¶
func (app *PersistentTriasCodeApplication) Info() (resInfo types.ResponseInfo)
func (*PersistentTriasCodeApplication) InitChain ¶
func (app *PersistentTriasCodeApplication) InitChain(validators []*types.Validator)
Save the validators in the merkle tree
func (*PersistentTriasCodeApplication) Query ¶
func (app *PersistentTriasCodeApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery
func (*PersistentTriasCodeApplication) SetLogger ¶
func (app *PersistentTriasCodeApplication) SetLogger(l log.Logger)
func (*PersistentTriasCodeApplication) SetOption ¶
func (app *PersistentTriasCodeApplication) SetOption(key string, value string) (log string)
func (*PersistentTriasCodeApplication) Validators ¶
func (app *PersistentTriasCodeApplication) Validators() (validators []*types.Validator)
type TriasCodeApplication ¶
type TriasCodeApplication struct { types.BaseApplication // contains filtered or unexported fields }
func NewTriasCodeApplication ¶
func NewTriasCodeApplication() *TriasCodeApplication
func (*TriasCodeApplication) CheckTx ¶
func (app *TriasCodeApplication) CheckTx(tx []byte) types.Result
检查数据 如果包括合约相关的,不关心是合约的创建还是执行,都转发到合约处 如果包括帐户交易相关的,直接转到交易服务处
func (*TriasCodeApplication) Commit ¶
func (app *TriasCodeApplication) Commit() types.Result
func (*TriasCodeApplication) DeliverTx ¶
func (app *TriasCodeApplication) DeliverTx(tx []byte) types.Result
tx is either "key=value" or just arbitrary bytes
func (*TriasCodeApplication) Info ¶
func (app *TriasCodeApplication) Info() (resInfo types.ResponseInfo)
func (*TriasCodeApplication) Query ¶
func (app *TriasCodeApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery)
TODO 查询merkle tree的交易问题修复
Click to show internal directories.
Click to hide internal directories.