Documentation
¶
Index ¶
- Variables
- func GetRegisteredContractInfo() map[string]*ContractInfo
- func RegisterContractConstructor(name string, addr *types.Address, f ContractConstructor)
- func RegisterExecutorConstructor(typ string, f TxsExecutorConstructor)
- func RegisterPierHAConstructor(typ string, f PierHAConstructor)
- func RegisterRegistryConstructor(typ string, f RegistryConstructor)
- type ApplyTxFunc
- type Contract
- type ContractConstructor
- type ContractInfo
- type HAClient
- type InvalidReason
- type PierHA
- type PierHAConstructor
- type RegisterContractFunc
- type Registry
- type RegistryConstructor
- type TxOpt
- type TxsExecutor
- type TxsExecutorConstructor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TxsExecutorConstructorM = make(map[string]TxsExecutorConstructor) ContractConstructorM = make(map[string]*ContractInfo) RegisterConstructorM = make(map[string]RegistryConstructor) PierHAConstructorM = make(map[string]PierHAConstructor) )
Functions ¶
func GetRegisteredContractInfo ¶
func GetRegisteredContractInfo() map[string]*ContractInfo
func RegisterContractConstructor ¶
func RegisterContractConstructor(name string, addr *types.Address, f ContractConstructor)
func RegisterExecutorConstructor ¶
func RegisterExecutorConstructor(typ string, f TxsExecutorConstructor)
func RegisterPierHAConstructor ¶
func RegisterPierHAConstructor(typ string, f PierHAConstructor)
func RegisterRegistryConstructor ¶
func RegisterRegistryConstructor(typ string, f RegistryConstructor)
Types ¶
type ApplyTxFunc ¶
type ApplyTxFunc func(int, pb.Transaction, InvalidReason, *TxOpt) *pb.Receipt
type ContractConstructor ¶
type ContractConstructor func() Contract
type ContractInfo ¶
type ContractInfo struct {
Name string
Constructor ContractConstructor
}
func GetContractInfo ¶
func GetContractInfo(addr *types.Address) (*ContractInfo, error)
type HAClient ¶
type HAClient interface {
//Check whethe there is a master pier connect to the BitXHub.
CheckMasterPier(address string) (*pb.Response, error)
//Set the master pier connect to the BitXHub.
SetMasterPier(address string, index string, timeout int64) (*pb.Response, error)
//Update the master pier status
HeartBeat(address string, index string) (*pb.Response, error)
}
type InvalidReason ¶
type InvalidReason string
type PierHAConstructor ¶
func GetPierHAConstructor ¶
func GetPierHAConstructor(typ string) (PierHAConstructor, error)
type RegisterContractFunc ¶
type RegistryConstructor ¶
type RegistryConstructor func(storage.Storage, logrus.FieldLogger) Registry
func GetRegistryConstructor ¶
func GetRegistryConstructor(typ string) (RegistryConstructor, error)
type TxsExecutor ¶
type TxsExecutor interface {
ApplyTransactions(txs []pb.Transaction, invalidTxs map[int]InvalidReason) []*pb.Receipt
GetBoltContracts() map[string]Contract
AddNormalTx(hash *types.Hash)
GetNormalTxs() []*types.Hash
AddInterchainCounter(to string, index uint64)
GetInterchainCounter() map[string][]uint64
GetDescription() string
}
type TxsExecutorConstructor ¶
type TxsExecutorConstructor func(ApplyTxFunc, RegisterContractFunc, logrus.FieldLogger) TxsExecutor
func GetExecutorConstructor ¶
func GetExecutorConstructor(typ string) (TxsExecutorConstructor, error)
Click to show internal directories.
Click to hide internal directories.