Documentation ¶
Index ¶
- Constants
- func ConvertDepositToSignAddress(address common.Address) (addr common.Address, err error)
- func ConvertSignToDepositAddress(address common.Address) (addr common.Address, err error)
- func GetAccountOriginalRole(account common.Address, hash common.Hash) (common.RoleType, error)
- func GetAccountTopologyInfo(account common.Address, number uint64) (*mc.TopologyNodeInfo, error)
- func GetDepositAddress() common.Address
- func GetDropNode() (result []common.Address)
- func GetElectedByHeight(height *big.Int) ([]vm.DepositDetail, error)
- func GetElectedByHeightAndRole(height *big.Int, roleType common.RoleType) ([]vm.DepositDetail, error)
- func GetElectedByHeightAndRoleByHash(hash common.Hash, roleType common.RoleType) ([]vm.DepositDetail, error)
- func GetElectedByHeightByHash(hash common.Hash) ([]vm.DepositDetail, error)
- func GetElectedByHeightWithdraw(height *big.Int) ([]vm.DepositDetail, error)
- func GetElectedByHeightWithdrawByHash(hash common.Hash) ([]vm.DepositDetail, error)
- func GetGapValidator() (rlt []common.Address)
- func GetHash() common.Hash
- func GetHeight() *big.Int
- func GetNodeNumber() (uint32, error)
- func GetRole() (role common.RoleType)
- func GetRolesByGroup(roleType common.RoleType) (result []common.Address)
- func GetRolesByGroupOnlyNextElect(roleType common.RoleType) (result []common.Address)
- func GetRolesByGroupWithNextElect(roleType common.RoleType) (result []common.Address)
- func GetSelfLevel() int
- func GetSignAddress() common.Address
- func GetTopologyByHash(reqTypes common.RoleType, hash common.Hash) (*mc.TopologyGraph, error)
- func GetTopologyByNumber(reqTypes common.RoleType, number uint64) (*mc.TopologyGraph, error)
- func GetTopologyInLinker() (result map[common.RoleType][]common.Address)
- func InDuration() bool
- func SetTopologyReader(topologyReader TopologyGraphReader)
- func Start(id discover.NodeID, path string, addr common.Address)
- func Stop()
- type Identity
- type TopologyGraphReader
Constants ¶
View Source
const ( TopNode = 5 DefaultNode = 6 ErrNode = 0 )
Variables ¶
This section is empty.
Functions ¶
func ConvertDepositToSignAddress ¶
ConvertDepositToSignAddress
func ConvertSignToDepositAddress ¶
ConvertSignToDepositAddress
func GetAccountOriginalRole ¶
GetAccountOriginalRole
func GetAccountTopologyInfo ¶
GetAccountTopologyInfo
func GetElectedByHeight ¶
func GetElectedByHeight(height *big.Int) ([]vm.DepositDetail, error)
GetElectedByHeight get all elected node by height.
func GetElectedByHeightAndRole ¶
func GetElectedByHeightAndRole(height *big.Int, roleType common.RoleType) ([]vm.DepositDetail, error)
GetElectedByHeightAndRole get elected node, miner or validator by block height and type.
func GetElectedByHeightAndRoleByHash ¶
func GetElectedByHeightAndRoleByHash(hash common.Hash, roleType common.RoleType) ([]vm.DepositDetail, error)
GetElectedByHeightAndRole get elected node, miner or validator by block height and type.
func GetElectedByHeightByHash ¶
func GetElectedByHeightByHash(hash common.Hash) ([]vm.DepositDetail, error)
GetElectedByHeight get all elected node by height.
func GetElectedByHeightWithdraw ¶
func GetElectedByHeightWithdraw(height *big.Int) ([]vm.DepositDetail, error)
GetElectedByHeightWithdraw get all info in deposit.
func GetElectedByHeightWithdrawByHash ¶
func GetElectedByHeightWithdrawByHash(hash common.Hash) ([]vm.DepositDetail, error)
GetElectedByHeightWithdraw get all info in deposit.
func GetRolesByGroup ¶
GetRolesByGroup
func GetRolesByGroupOnlyNextElect ¶
GetRolesByGroupOnlyBackup
func GetRolesByGroupWithNextElect ¶
GetRolesByGroupWithBackup
func GetTopologyByHash ¶
func GetTopologyByNumber ¶
GetTopologyByNumber
func GetTopologyInLinker ¶
GetTopologyInLinker
func SetTopologyReader ¶
func SetTopologyReader(topologyReader TopologyGraphReader)
SetTopologyReader
Types ¶
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Identity stand for node's identity.
type TopologyGraphReader ¶
type TopologyGraphReader interface { GetCurrentHash() common.Hash GetHashByNumber(number uint64) common.Hash GetTopologyGraphByHash(blockHash common.Hash) (*mc.TopologyGraph, error) GetOriginalElectByHash(blockHash common.Hash) ([]common.Elect, error) GetNextElectByHash(blockHash common.Hash) ([]common.Elect, error) GetBroadcastAccounts(blockHash common.Hash) ([]common.Address, error) GetInnerMinersAccount(blockHash common.Hash) ([]common.Address, error) GetSuperSeq(blockHash common.Hash) (uint64, error) }
Click to show internal directories.
Click to hide internal directories.