Documentation ¶
Index ¶
- func AdapterGetCallBack(transID, txID int64, key string) ([]byte, error)
- func AdapterSetCallBack(transID, txID int64, data map[string][]byte) (*bool, error)
- func AddAccountToken(transID, txID int64, addr, token types.Address)
- func BalanceOf(transID, txID int64, addr types.Address, token types.Address) bn.Number
- func BeginBlock(transID int64)
- func CheckAccountNonce(transID, txID int64, exAddr types.Address, nonce uint64) error
- func CheckBVMEnable(transID, txID int64) bool
- func CheckBlackList(transID, txID int64, addr types.Address) bool
- func CheckContractAddr(transID, txID int64, addr string) bool
- func CheckOrgInfo(transID, txID int64, orgID, orgAddr string) bool
- func CommitBlock(transID int64)
- func CommitTx(transID, txID int64) ([]byte, map[string][]byte)
- func CommitTx2V1(transID int64, txBuffer map[string][]byte)
- func Get(transID, txID int64, key string) ([]byte, error)
- func GetChainGenesisVersion() int
- func GetChainID() string
- func GetContract(contractAddr types.Address) *std.Contract
- func GetContractCodeHash(transID, txID int64, contractAddr types.Address) []byte
- func GetContractMeta(transID, txID int64, contractAddr types.Address) std.ContractMeta
- func GetContracts(transID, txID int64, orgID string) []types.Address
- func GetContractsByName(transID, txID int64, name, orgID string) []types.Address
- func GetContractsWithHeight(transID, txID, height int64) (contractAddrs []std.ContractWithEffectHeight)
- func GetEffectContractByName(transID, txID, height int64, name, orgID string) *std.Contract
- func GetFromDB(key string) ([]byte, error)
- func GetGasPriceRatio(transID, txID int64) string
- func GetGenesisContractAddr(transID, txID int64) types.Address
- func GetGenesisOrgID(transID, txID int64) string
- func GetGenesisToken() *std.Token
- func GetMineContract(transID, txID int64) (mineContract []std.MineContract)
- func GetOrgCodeHash(transID, txID int64, orgID string) []byte
- func GetOrgID(transID, txID int64, contractAddr types.Address) string
- func GetOrgSigners(transID, txID int64, orgID string) []types2.PubKey
- func GetTokenByAddress(transID, txID int64, addr types.Address) *std.Token
- func GetWorldAppState(transID, txID int64) *abci.AppState
- func Init(sdbName string, maxSnapshotCount int)
- func KeyOfAccount(exAddress types.Address) string
- func KeyOfAccountNonce(exAddress types.Address) string
- func KeyOfAccountToken(exAddress types.Address, contractAddr types.Address) string
- func KeyOfToken(tokenAddr types.Address) string
- func NewCommittableTransactionID() (int64, *statedb.Transaction)
- func NewRollbackTransactionID() (int64, *statedb.Transaction)
- func NewTx(transID int64) int64
- func RollbackBlock(transID int64)
- func RollbackStateDB(rollbackTransactions int)
- func RollbackTx(transID, txID int64)
- func Set(transID, txID int64, key string, value []byte)
- func SetAccountNonce(transID, txID int64, exAddress types.Address, nonce uint64) (nonceBuffer map[string][]byte, err error)
- func SetBalance(transID, txID int64, addr types.Address, token types.Address, value bn.Number)
- func SetChainIDOnce(cID string)
- func SetContract(transID, txID int64, contract *std.Contract)
- func SetContractMeta(transID, txID int64, contract *std.ContractMeta)
- func SetContractVersionList(transID, txID int64, orgID string, vl *std.ContractVersionList)
- func SetGenesisContractAddr(transID, txID int64, addr types.Address)
- func SetMineContract(transID, txID int64, mines []std.MineContract)
- func SetOrganization(transID, txID int64, org *std.Organization)
- func SetWorldAppState(transID, txID int64, appState *abci.AppState)
- type RewardStrategy
- type Rewarder
- type Trans
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdapterGetCallBack ¶
AdapterGetCallBack callback of get function
func AdapterSetCallBack ¶
AdapterSetCallBack callback of set function
func AddAccountToken ¶
func CheckAccountNonce ¶
CheckAccountNonce check account's nonce
func CheckBVMEnable ¶
func CheckBlackList ¶
CheckBlackList check if an address is in black list
func CheckContractAddr ¶
CheckContractAddr check contract is valid or not
func CheckOrgInfo ¶
CheckOrgInfo check org address
func CommitTx2V1 ¶
CommitTx2V2 commit tx changes
func GetChainGenesisVersion ¶
func GetChainGenesisVersion() int
func GetChainID ¶
func GetChainID() string
func GetContract ¶
GetContract get specified contract data with contract address
func GetContractCodeHash ¶
GetContractCodeHash get contract code hash
func GetContractMeta ¶
func GetContractMeta(transID, txID int64, contractAddr types.Address) std.ContractMeta
GetContractMeta get contract code
func GetContracts ¶
GetContracts get contracts of org
func GetContractsByName ¶
func GetContractsWithHeight ¶
func GetContractsWithHeight(transID, txID, height int64) (contractAddrs []std.ContractWithEffectHeight)
func GetEffectContractByName ¶
func GetGasPriceRatio ¶
func GetGenesisContractAddr ¶
GetGenesisContractAddr Get genesis contract address
func GetGenesisOrgID ¶
func GetGenesisToken ¶
GetGenesisToken get genesis token of block chain
func GetMineContract ¶
func GetMineContract(transID, txID int64) (mineContract []std.MineContract)
func GetOrgCodeHash ¶
GetOrgCodeHash get org code hash
func GetWorldAppState ¶
func KeyOfAccount ¶
func KeyOfAccountNonce ¶
func KeyOfAccountToken ¶
func KeyOfToken ¶
func NewCommittableTransactionID ¶
func NewCommittableTransactionID() (int64, *statedb.Transaction)
NewCommittableTransactionID create a committable transaction and return ID
func NewRollbackTransactionID ¶
func NewRollbackTransactionID() (int64, *statedb.Transaction)
NewRollbackTransactionID create a rollback transaction and return ID
func RollbackStateDB ¶
func RollbackStateDB(rollbackTransactions int)
func SetAccountNonce ¶
func SetAccountNonce(transID, txID int64, exAddress types.Address, nonce uint64) (nonceBuffer map[string][]byte, err error)
SetAccountNonce DeliverTx需要调用此接口检查并设置nonce。设置的nonce不会因为RollbackTx而取消。
func SetBalance ¶
SetBalance set account's balance of given token to given value
func SetChainIDOnce ¶
func SetChainIDOnce(cID string)
func SetContract ¶
func SetContractMeta ¶
func SetContractMeta(transID, txID int64, contract *std.ContractMeta)
func SetContractVersionList ¶
func SetContractVersionList(transID, txID int64, orgID string, vl *std.ContractVersionList)
func SetGenesisContractAddr ¶
SetGenesisContractAddr set genesis contract address to statedb
func SetMineContract ¶
func SetMineContract(transID, txID int64, mines []std.MineContract)
func SetOrganization ¶
func SetOrganization(transID, txID int64, org *std.Organization)
func SetWorldAppState ¶
SetWorldAppState set data of app state
Types ¶
type RewardStrategy ¶
type RewardStrategy struct { Strategy []Rewarder `json:"rewardStrategy,omitempty"` //奖励策略 EffectHeight int64 `json:"effectHeight,omitempty"` //生效高度 }
RewardStrategy struct of reward strategy
type Rewarder ¶
type Rewarder struct { Name string `json:"name"` // 被奖励者名称 RewardPercent string `json:"rewardPercent"` // 奖励比例 Address string `json:"address"` // 被奖励者地址 }
Rewarder declare reward information
func GetRewardStrategy ¶
RewardStrategy gets reward strategy of chain
type Trans ¶
type Trans struct { Transaction *statedb.Transaction TxMap map[int64]*statedb.Tx // txID => *statedb2.Tx }
type Validator ¶
type Validator struct { PubKey types.PubKey `json:"nodepubkey,omitempty"` //节点公钥 Power int64 `json:"power,omitempty"` //节点记账权重 RewardAddr string `json:"rewardaddr,omitempty"` //节点接收奖励的地址 Name string `json:"name,omitempty"` //节点名称 NodeAddr string `json:"nodeaddr,omitempty"` //节点地址 }
Validator data struct of validator
func GetAllValidators ¶
GetAllValidators get all validators information