Documentation ¶
Index ¶
- Constants
- func RenameDir(oldDir, newDir string) error
- type DataDir
- type Node
- func (n *Node) GetAllPeerID() []peer.ID
- func (n *Node) GetAllPeerIDMap() map[string]peer.AddrInfo
- func (n *Node) GetAllPeerIdString() []string
- func (n *Node) GetAllTeeWorkAccount() []string
- func (n *Node) GetAllTeeWorkEndPoint() []string
- func (n *Node) GetCpuCore() int
- func (n *Node) GetPeer(peerid string) (peer.AddrInfo, bool)
- func (n *Node) GetPodr2Key() *proof.RSAKeyPair
- func (n *Node) GetTeeWork(account string) (string, bool)
- func (n *Node) HasPeer(peerid string) bool
- func (n *Node) InitPois(firstflag bool, front, rear, freeSpace, count int64, key_n, key_g big.Int) error
- func (n *Node) LoadPeersFromDisk(path string) error
- func (n *Node) RebuildDirs()
- func (n *Node) RemovePeerIntranetAddr()
- func (n *Node) ReportLogs(file string)
- func (n *Node) Run()
- func (n *Node) SaveCpuCore(cores int)
- func (n *Node) SaveOrUpdatePeerUnSafe(peerid string, addr peer.AddrInfo)
- func (n *Node) SavePeer(peerid string, addr peer.AddrInfo)
- func (n *Node) SavePeersToDisk(path string) error
- func (n *Node) SaveTeeWork(account, endpoint string)
- func (n *Node) SetPublickey(pubkey []byte) error
- func (n *Node) UpdatePeerFirst()
- func (n *Node) UpdatePeers()
- type Pois
- type RandomList
Constants ¶
View Source
const ( Active = iota Calculate Missing Recovery )
View Source
const ( Cach_prefix_metadata = "metadata:" Cach_prefix_MyLost = "mylost:" Cach_prefix_recovery = "recovery:" Cach_prefix_TargetMiner = "targetminer:" Cach_prefix_File = "file:" Cach_prefix_ParseBlock = "parseblocks" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct { DataDir *DataDir MinerPoisInfo *pb.MinerPoisInfo sdk.SDK core.P2P confile.Confile logger.Logger cache.Cache *Pois // contains filtered or unexported fields }
func (*Node) GetAllPeerID ¶ added in v0.7.0
func (*Node) GetAllPeerIDMap ¶ added in v0.7.0
func (*Node) GetAllPeerIdString ¶ added in v0.7.0
func (*Node) GetAllTeeWorkAccount ¶ added in v0.6.2
func (*Node) GetAllTeeWorkEndPoint ¶ added in v0.7.6
func (*Node) GetCpuCore ¶ added in v0.7.1
func (*Node) GetPodr2Key ¶ added in v0.7.3
func (n *Node) GetPodr2Key() *proof.RSAKeyPair
func (*Node) LoadPeersFromDisk ¶ added in v0.6.3
func (*Node) RebuildDirs ¶
func (n *Node) RebuildDirs()
func (*Node) RemovePeerIntranetAddr ¶ added in v0.6.3
func (n *Node) RemovePeerIntranetAddr()
func (*Node) ReportLogs ¶ added in v0.7.1
func (*Node) SaveCpuCore ¶ added in v0.7.1
func (*Node) SaveOrUpdatePeerUnSafe ¶ added in v0.6.3
func (*Node) SavePeersToDisk ¶ added in v0.6.3
func (*Node) SaveTeeWork ¶ added in v0.6.2
func (*Node) SetPublickey ¶
func (*Node) UpdatePeerFirst ¶ added in v0.7.1
func (n *Node) UpdatePeerFirst()
func (*Node) UpdatePeers ¶ added in v0.7.1
func (n *Node) UpdatePeers()
type RandomList ¶
Click to show internal directories.
Click to hide internal directories.