Documentation
¶
Index ¶
- Variables
- func BlockHash(lastBlockHeight int64, lastBlockHash []byte, transactionHashes [][]byte) (ret []byte)
- func TODO(whatever interface{})
- type Application
- func (app *Application) BeginBlock(req abcitypes.RequestBeginBlock) abcitypes.ResponseBeginBlock
- func (app *Application) CheckTx(req abcitypes.RequestCheckTx) abcitypes.ResponseCheckTx
- func (app *Application) Commit() abcitypes.ResponseCommit
- func (app *Application) DeliverTx(req abcitypes.RequestDeliverTx) abcitypes.ResponseDeliverTx
- func (app *Application) EndBlock(req abcitypes.RequestEndBlock) abcitypes.ResponseEndBlock
- func (app *Application) GetCommonState() *CommonState
- func (app *Application) Info(req abcitypes.RequestInfo) (resInfo abcitypes.ResponseInfo)
- func (app *Application) InitChain(req abcitypes.RequestInitChain) abcitypes.ResponseInitChain
- func (app *Application) Query(reqQuery abcitypes.RequestQuery) abcitypes.ResponseQuery
- type CommonState
- type PersistentState
- type TemporaryState
Constants ¶
This section is empty.
Variables ¶
View Source
var DatabaseVersion uint64 = 0x1
View Source
var ProtocolVersion uint64 = 0x1
Functions ¶
Types ¶
type Application ¶
type Application struct { abcitypes.BaseApplication // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication(dbDir string) *Application
func (*Application) BeginBlock ¶
func (app *Application) BeginBlock(req abcitypes.RequestBeginBlock) abcitypes.ResponseBeginBlock
func (*Application) CheckTx ¶
func (app *Application) CheckTx(req abcitypes.RequestCheckTx) abcitypes.ResponseCheckTx
func (*Application) Commit ¶
func (app *Application) Commit() abcitypes.ResponseCommit
func (*Application) DeliverTx ¶
func (app *Application) DeliverTx(req abcitypes.RequestDeliverTx) abcitypes.ResponseDeliverTx
func (*Application) EndBlock ¶
func (app *Application) EndBlock(req abcitypes.RequestEndBlock) abcitypes.ResponseEndBlock
func (*Application) GetCommonState ¶
func (app *Application) GetCommonState() *CommonState
func (*Application) Info ¶
func (app *Application) Info(req abcitypes.RequestInfo) (resInfo abcitypes.ResponseInfo)
func (*Application) InitChain ¶
func (app *Application) InitChain(req abcitypes.RequestInitChain) abcitypes.ResponseInitChain
func (*Application) Query ¶
func (app *Application) Query(reqQuery abcitypes.RequestQuery) abcitypes.ResponseQuery
type CommonState ¶
type CommonState struct { TransactionCount int64 // The number of transactions in all blocks. AccountNonce map[string]uint64 // account -> nonce TrustedPublicKeys map[string]ed25519.PubKey // account -> publickey // TODO store the content in memory for now // prototype only! DatabaseHashItems map[int64]types.DatabaseHashItem // startTime -> HashItem Rawtransactions map[string]*types.RawTransaction Blocktransactions map[int64]*types.BlockTransactions }
func NewCommonState ¶
func NewCommonState() *CommonState
func (*CommonState) Clone ¶
func (self *CommonState) Clone() *CommonState
type PersistentState ¶
type PersistentState struct { CommonState CommonState LastBlockHeight int64 // The height of last block. Every time a new block is added, the height gets increased by 1. LastBlockHash []byte }
func NewPersistentState ¶
func NewPersistentState() *PersistentState
type TemporaryState ¶
type TemporaryState struct { CommonState CommonState RawTransactions []*types.RawTransaction }
func NewTemporaryStateFromPersistentState ¶
func NewTemporaryStateFromPersistentState(state *PersistentState) *TemporaryState
Click to show internal directories.
Click to hide internal directories.