|
|
@ -70,7 +70,7 @@ public: |
|
|
|
void reset(); |
|
|
|
|
|
|
|
DownloadMan const& downloadMan() const { return m_man; } |
|
|
|
bool isSyncing() const { Guard l(x_sync); return isSyncingInternal(); } |
|
|
|
bool isSyncing() const { Guard l(x_sync); return isSyncing_UNSAFE(); } |
|
|
|
bool isBanned(p2p::NodeId _id) const { return !!m_banned.count(_id); } |
|
|
|
|
|
|
|
void noteNewTransactions() { m_newTransactions = true; } |
|
|
@ -92,7 +92,7 @@ private: |
|
|
|
std::pair<std::vector<std::shared_ptr<EthereumPeer>>, std::vector<std::shared_ptr<EthereumPeer>>> randomSelection(unsigned _percent = 25, std::function<bool(EthereumPeer*)> const& _allow = [](EthereumPeer const*){ return true; }); |
|
|
|
void forEachPeerPtr(std::function<void(std::shared_ptr<EthereumPeer>)> const& _f) const; |
|
|
|
void forEachPeer(std::function<void(EthereumPeer*)> const& _f) const; |
|
|
|
bool isSyncingInternal() const; |
|
|
|
bool isSyncing_UNSAFE() const; |
|
|
|
|
|
|
|
/// Sync with the BlockChain. It might contain one of our mined blocks, we might have new candidates from the network.
|
|
|
|
void doWork(); |
|
|
|