Documentation
¶
Index ¶
- Constants
- func Compare(studentAdd string, projectAdd string) bool
- func MakeValSetChangeTx(pubkey []byte, power uint64) []byte
- func SaveLastBlock(db dbm.DB, lastBlock LastBlockInfo)
- type LastBlockInfo
- type PersistentStorageApplication
- func (app *PersistentStorageApplication) BeginBlock(hash []byte, header *types.Header)
- func (app *PersistentStorageApplication) CheckTx(tx []byte) types.Result
- func (app *PersistentStorageApplication) Commit() types.Result
- func (app *PersistentStorageApplication) DeliverTx(tx []byte) types.Result
- func (app *PersistentStorageApplication) EndBlock(height uint64) (resEndBlock types.ResponseEndBlock)
- func (app *PersistentStorageApplication) Info() (resInfo types.ResponseInfo)
- func (app *PersistentStorageApplication) InitChain(validators []*types.Validator)
- func (app *PersistentStorageApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery
- func (app *PersistentStorageApplication) SetLogger(l log.Logger)
- func (app *PersistentStorageApplication) SetOption(key string, value string) (log string)
- func (app *PersistentStorageApplication) Validators() (validators []*types.Validator)
- type StorageApplication
- func (app *StorageApplication) CheckTx(tx []byte) types.Result
- func (app *StorageApplication) Commit() types.Result
- func (app *StorageApplication) DeliverTx(tx []byte) types.Result
- func (app *StorageApplication) Info() (resInfo types.ResponseInfo)
- func (app *StorageApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery)
Constants ¶
View Source
const ( WriteSet byte = 0x01 WriteRem byte = 0x02 )
Transaction type bytes
View Source
const (
PathDoc string = "/Users/b/Documents/"
)
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 PersistentStorageApplication ¶
type PersistentStorageApplication struct {
// contains filtered or unexported fields
}
func NewPersistentStorageApplication ¶
func NewPersistentStorageApplication(dbDir string) *PersistentStorageApplication
func (*PersistentStorageApplication) BeginBlock ¶
func (app *PersistentStorageApplication) BeginBlock(hash []byte, header *types.Header)
Track the block hash and header information
func (*PersistentStorageApplication) CheckTx ¶
func (app *PersistentStorageApplication) CheckTx(tx []byte) types.Result
func (*PersistentStorageApplication) Commit ¶
func (app *PersistentStorageApplication) Commit() types.Result
func (*PersistentStorageApplication) DeliverTx ¶
func (app *PersistentStorageApplication) DeliverTx(tx []byte) types.Result
tx is either "key=value" or just arbitrary bytes
func (*PersistentStorageApplication) EndBlock ¶
func (app *PersistentStorageApplication) EndBlock(height uint64) (resEndBlock types.ResponseEndBlock)
Update the validator set
func (*PersistentStorageApplication) Info ¶
func (app *PersistentStorageApplication) Info() (resInfo types.ResponseInfo)
func (*PersistentStorageApplication) InitChain ¶
func (app *PersistentStorageApplication) InitChain(validators []*types.Validator)
Save the validators in the merkle tree
func (*PersistentStorageApplication) Query ¶
func (app *PersistentStorageApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery
func (*PersistentStorageApplication) SetLogger ¶
func (app *PersistentStorageApplication) SetLogger(l log.Logger)
func (*PersistentStorageApplication) SetOption ¶
func (app *PersistentStorageApplication) SetOption(key string, value string) (log string)
func (*PersistentStorageApplication) Validators ¶
func (app *PersistentStorageApplication) Validators() (validators []*types.Validator)
type StorageApplication ¶
type StorageApplication struct {
types.BaseApplication
// contains filtered or unexported fields
}
func NewStorageApplication ¶
func NewStorageApplication() *StorageApplication
func (*StorageApplication) Commit ¶
func (app *StorageApplication) Commit() types.Result
func (*StorageApplication) DeliverTx ¶
func (app *StorageApplication) DeliverTx(tx []byte) types.Result
tx is either "0x01|len(len(key))|len(key)|key|len(len(value))|len(value)|value" or "0x02|len(len(key))|len(key)|key|len(len(value))|len(value)|value"
func (*StorageApplication) Info ¶
func (app *StorageApplication) Info() (resInfo types.ResponseInfo)
func (*StorageApplication) Query ¶
func (app *StorageApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery)
Click to show internal directories.
Click to hide internal directories.