package blockpool import ( "fmt" "sync" "github.com/ethereum/go-ethereum/common" ) type statusValues struct { BlockHashes int // number of hashes fetched this session BlockHashesInPool int // number of hashes currently in the pool Blocks int // number of blocks fetched this session BlocksInPool int // number of blocks currently in the pool BlocksInChain int // number of blocks inserted/connected to the blockchain this session NewBlocks int // number of new blocks (received with new blocks msg) this session Forks int // number of chain forks in the blockchain (poolchain) this session LongestChain int // the longest chain inserted since the start of session (aka session blockchain height) BestPeer []byte //Pubkey Syncing bool // requesting, updating etc Peers int // cumulative number of all different registered peers since the start of this session ActivePeers int // cumulative number of all different peers that contributed a hash or block since the start of this session LivePeers int // number of live peers registered with the block pool (supposed to be redundant but good sanity check BestPeers int // cumulative number of all peers that at some point were promoted as best peer (peer with highest TD status) this session BadPeers int // cumulative number of all peers that violated the protocol (invalid block or pow, unrequested hash or block, etc) } type status struct { lock sync.Mutex values statusValues chain map[common.Hash]int peers map[string]int bestPeers map[string]int badPeers map[string]int activePeers map[string]int } func newStatus() *status { return &status{ chain: make(map[common.Hash]int), peers: make(map[string]int), bestPeers: make(map[string]int), badPeers: make(map[string]int), activePeers: make(map[string]int), } } type Status struct { statusValues } // blockpool status for reporting func (self *BlockPool) Status() *Status { self.status.lock.Lock() defer self.status.lock.Unlock() self.status.values.ActivePeers = len(self.status.activePeers) self.status.values.BestPeers = len(self.status.bestPeers) self.status.values.BadPeers = len(self.status.badPeers) self.status.values.LivePeers = len(self.peers.peers) self.status.values.Peers = len(self.status.peers) self.status.values.BlockHashesInPool = len(self.pool) return &Status{self.status.values} } func (self *Status) String() string { return fmt.Sprintf(` Syncing: %v BlockHashes: %v BlockHashesInPool: %v Blocks: %v BlocksInPool: %v BlocksInChain: %v NewBlocks: %v Forks: %v LongestChain: %v Peers: %v LivePeers: %v ActivePeers: %v BestPeers: %v BadPeers: %v `, self.Syncing, self.BlockHashes, self.BlockHashesInPool, self.Blocks, self.BlocksInPool, self.BlocksInChain, self.NewBlocks, self.Forks, self.LongestChain, self.Peers, self.LivePeers, self.ActivePeers, self.BestPeers, self.BadPeers, ) } func (self *BlockPool) syncing() { self.status.lock.Lock() defer self.status.lock.Unlock() if !self.status.values.Syncing { self.status.values.Syncing = true go func() { self.wg.Wait() self.status.lock.Lock() self.status.values.Syncing = false self.status.lock.Unlock() }() } } files/lodash-4.17.19'>dependabot/npm_and_yarn/devel/electron6/files/lodash-4.17.19 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/py-periscope
Commit message (Collapse)AuthorAgeFilesLines
* Convert Python ports to FLAVORS.mat2018-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ports using USE_PYTHON=distutils are now flavored. They will automatically get flavors (py27, py34, py35, py36) depending on what versions they support. There is also a USE_PYTHON=flavors for ports that do not use distutils but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if using distutils but flavors are not wanted. A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been added to cope with Python ports that did not have the Python PKGNAMEPREFIX but are flavored. USES=python now also exports a PY_FLAVOR variable that contains the current python flavor. It can be used in dependency lines when the port itself is not python flavored. For example, deskutils/calibre. By default, all the flavors are generated. To only generate flavors for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf. In all the ports with Python dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python module with Python flavors, as the content will be the same). For example: RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} PR: 223071 Reviewed by: portmgr, python Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D12464
* - Now that as of r439454 UNRAR option description is in the standard pool,danfe2017-04-272-9/+3
| | | | | | | | remove its local definition (one might argue this one was specifically about handling compressed subtitles, but the whole port is ``Subtitles searching module'', so generic description fits just fine) - Unbreak the port by pointing to archived distfile in Google Cloud Storage and update WWW: line in the port description while I'm here
* Mark the remaining ports depending on Google Code as DEPRECATED, with anmat2017-03-04