executor

package
v6.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindKey

func BindKey(id string) (key []byte)

BindKey bind key

func GetName

func GetName() string

GetName get name

func Infos

func Infos(db dbm.KV, tinfos *ty.TicketInfos) (types.Message, error)

Infos info

func Init

func Init(name string, sub []byte)

Init initial

func Key

func Key(id string) (key []byte)

Key address to save key

func List

func List(db dbm.Lister, db2 dbm.KV, tlist *ty.TicketList) (types.Message, error)

List list db

Types

type Action

type Action struct {
	// contains filtered or unexported fields
}

Action action type

func NewAction

func NewAction(t *Ticket, tx *types.Transaction) *Action

NewAction new action type

func (*Action) GenesisInit

func (action *Action) GenesisInit(genesis *ty.TicketGenesis) (*types.Receipt, error)

GenesisInit init genesis

func (*Action) TicketBind

func (action *Action) TicketBind(tbind *ty.TicketBind) (*types.Receipt, error)

TicketBind 授权某个地址进行挖矿

func (*Action) TicketClose

func (action *Action) TicketClose(tclose *ty.TicketClose) (*types.Receipt, error)

TicketClose close tick

func (*Action) TicketMiner

func (action *Action) TicketMiner(miner *ty.TicketMiner, index int) (*types.Receipt, error)

TicketMiner ticket miner

func (*Action) TicketOpen

func (action *Action) TicketOpen(topen *ty.TicketOpen) (*types.Receipt, error)

TicketOpen ticket open

type DB

type DB struct {
	ty.Ticket
	// contains filtered or unexported fields
}

DB db

func NewDB

func NewDB(id, minerAddress, returnWallet string, blocktime int64, isGenesis bool) *DB

NewDB new instance

func (*DB) GetKVSet

func (t *DB) GetKVSet() (kvset []*types.KeyValue)

GetKVSet get kv set

func (*DB) GetReceiptLog

func (t *DB) GetReceiptLog() *types.ReceiptLog

GetReceiptLog get receipt

func (*DB) Save

func (t *DB) Save(db dbm.KV)

Save save

type Ticket

type Ticket struct {
	drivers.DriverBase
}

Ticket driver type

func (*Ticket) CheckReceiptExecOk

func (t *Ticket) CheckReceiptExecOk() bool

CheckReceiptExecOk return true to check if receipt ty is ok

func (*Ticket) CheckTx

func (t *Ticket) CheckTx(tx *types.Transaction, index int) error

CheckTx check tx

func (*Ticket) ExecDelLocal_Genesis

func (t *Ticket) ExecDelLocal_Genesis(payload *ty.TicketGenesis, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecDelLocal_Genesis exec del local genesis

func (*Ticket) ExecDelLocal_Miner

func (t *Ticket) ExecDelLocal_Miner(payload *ty.TicketMiner, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecDelLocal_Miner exec del local miner

func (*Ticket) ExecDelLocal_Tbind

func (t *Ticket) ExecDelLocal_Tbind(payload *ty.TicketBind, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecDelLocal_Tbind exec del local bind

func (*Ticket) ExecDelLocal_Tclose

func (t *Ticket) ExecDelLocal_Tclose(payload *ty.TicketClose, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecDelLocal_Tclose exec del local close

func (*Ticket) ExecDelLocal_Topen

func (t *Ticket) ExecDelLocal_Topen(payload *ty.TicketOpen, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecDelLocal_Topen exec del local open

func (*Ticket) ExecLocal_Genesis

func (t *Ticket) ExecLocal_Genesis(payload *ty.TicketGenesis, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Genesis exec local genesis

func (*Ticket) ExecLocal_Miner

func (t *Ticket) ExecLocal_Miner(payload *ty.TicketMiner, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Miner exec local miner

func (*Ticket) ExecLocal_Tbind

func (t *Ticket) ExecLocal_Tbind(payload *ty.TicketBind, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Tbind exec local bind

func (*Ticket) ExecLocal_Tclose

func (t *Ticket) ExecLocal_Tclose(payload *ty.TicketClose, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Tclose exec local close

func (*Ticket) ExecLocal_Topen

func (t *Ticket) ExecLocal_Topen(payload *ty.TicketOpen, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Topen exec local open

func (*Ticket) Exec_Genesis

func (t *Ticket) Exec_Genesis(payload *ty.TicketGenesis, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Genesis exec genesis

func (*Ticket) Exec_Miner

func (t *Ticket) Exec_Miner(payload *ty.TicketMiner, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Miner exec miner

func (*Ticket) Exec_Tbind

func (t *Ticket) Exec_Tbind(payload *ty.TicketBind, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Tbind exec bind

func (*Ticket) Exec_Tclose

func (t *Ticket) Exec_Tclose(payload *ty.TicketClose, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Tclose exec close

func (*Ticket) Exec_Topen

func (t *Ticket) Exec_Topen(payload *ty.TicketOpen, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Topen exec open

func (*Ticket) GetDriverName

func (t *Ticket) GetDriverName() string

GetDriverName ...

func (*Ticket) GetRandNum

func (ticket *Ticket) GetRandNum(blockHash []byte, blockNum int64) (types.Message, error)

GetRandNum for ticket executor

func (*Ticket) IsFriend

func (t *Ticket) IsFriend(myexec, writekey []byte, tx *types.Transaction) bool

IsFriend check is fri

func (*Ticket) Query_MinerAddress

func (ticket *Ticket) Query_MinerAddress(param *types.ReqString) (types.Message, error)

Query_MinerAddress query miner addr

func (*Ticket) Query_MinerSourceList

func (ticket *Ticket) Query_MinerSourceList(param *types.ReqString) (types.Message, error)

Query_MinerSourceList query miner src list

func (*Ticket) Query_RandNumHash

func (ticket *Ticket) Query_RandNumHash(param *types.ReqRandHash) (types.Message, error)

Query_RandNumHash query randnumhash

func (*Ticket) Query_TicketInfos

func (ticket *Ticket) Query_TicketInfos(param *pty.TicketInfos) (types.Message, error)

Query_TicketInfos query tick info

func (*Ticket) Query_TicketList

func (ticket *Ticket) Query_TicketList(param *pty.TicketList) (types.Message, error)

Query_TicketList query tick list

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL