Documentation
¶
Index ¶
- Constants
- type Application
- func (app *Application) Close() error
- func (app *Application) Info(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)
- func (app *Application) ProcessDVSRequest(_ context.Context, req *types.RequestProcessDVSRequest) (*types.ResponseProcessDVSRequest, error)
- func (app *Application) ProcessDVSResponse(_ context.Context, req *types.RequestProcessDVSResponse) (*types.ResponseProcessDVSResponse, error)
- func (app *Application) Query(_ context.Context, reqQuery *types.RequestQuery) (*types.ResponseQuery, error)
- type State
Constants ¶
const ( ValidatorPrefix = "val=" AppVersion uint64 = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
types.BaseApplication
// contains filtered or unexported fields
}
Application is the kvstore state machine. It complies with the abci.Application interface. It takes transactions in the form of key=value and saves them in a database. This is a somewhat trivial example as there is no real state execution
func NewApplication ¶
func NewApplication(db dbm.DB) *Application
NewApplication creates an instance of the kvstore from the provided database
func NewInMemoryApplication ¶
func NewInMemoryApplication() *Application
NewInMemoryApplication creates a new application from an in memory database. Nothing will be persisted.
func NewPersistentApplication ¶
func NewPersistentApplication(dbDir string) *Application
NewPersistentApplication creates a new application using the goleveldb database engine
func (*Application) Close ¶
func (app *Application) Close() error
func (*Application) Info ¶
func (app *Application) Info(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)
Info returns information about the state of the application. This is generally used everytime a Tendermint instance begins and let's the application know what Tendermint versions it's interacting with. Based from this information, Tendermint will ensure it is in sync with the application by potentially replaying the blocks it has. If the Application returns a 0 appBlockHeight, Tendermint will call InitChain to initialize the application with consensus related data
func (*Application) ProcessDVSRequest ¶
func (app *Application) ProcessDVSRequest(_ context.Context, req *types.RequestProcessDVSRequest) (*types.ResponseProcessDVSRequest, error)
func (*Application) ProcessDVSResponse ¶
func (app *Application) ProcessDVSResponse(_ context.Context, req *types.RequestProcessDVSResponse) (*types.ResponseProcessDVSResponse, error)
func (*Application) Query ¶
func (app *Application) Query(_ context.Context, reqQuery *types.RequestQuery) (*types.ResponseQuery, error)
Returns an associated value or nil if missing.