diff --git a/libethereum/TransactionQueue.cpp b/libethereum/TransactionQueue.cpp index 40a149ebf..785e16c2d 100644 --- a/libethereum/TransactionQueue.cpp +++ b/libethereum/TransactionQueue.cpp @@ -97,7 +97,7 @@ std::unordered_map TransactionQueue::transactions() const ReadGuard l(m_lock); auto ret = m_current; for (auto const& i: m_future) - if (i.second.nonce() < maxNonce(i.second.sender())) + if (i.second.nonce() < maxNonce_WITH_LOCK(i.second.sender())) ret.insert(i); return ret; } @@ -136,6 +136,11 @@ u256 TransactionQueue::maxNonce(Address const& _a) const { // cdebug << "txQ::maxNonce" << _a; ReadGuard l(m_lock); + return maxNonce_WITH_LOCK(_a); +} + +u256 TransactionQueue::maxNonce_WITH_LOCK(Address const& _a) const +{ u256 ret = 0; auto r = m_senders.equal_range(_a); for (auto it = r.first; it != r.second; ++it) diff --git a/libethereum/TransactionQueue.h b/libethereum/TransactionQueue.h index 6036caa83..a07efb848 100644 --- a/libethereum/TransactionQueue.h +++ b/libethereum/TransactionQueue.h @@ -72,6 +72,7 @@ private: void insertCurrent_WITH_LOCK(std::pair const& _p); bool remove_WITH_LOCK(h256 const& _txHash); + u256 maxNonce_WITH_LOCK(Address const& _a) const; mutable SharedMutex m_lock; ///< General lock. h256Hash m_known; ///< Hashes of transactions in both sets. diff --git a/libp2p/Host.cpp b/libp2p/Host.cpp index 2f139fd3d..9c3e629d4 100644 --- a/libp2p/Host.cpp +++ b/libp2p/Host.cpp @@ -392,7 +392,7 @@ string Host::pocHost() std::unordered_map const& Host::pocHosts() { static const std::unordered_map c_ret = { -// { Public(""), "poc-9.ethdev.com:30303" }, + { Public("487611428e6c99a11a9795a6abe7b529e81315ca6aad66e2a2fc76e3adf263faba0d35466c2f8f68d561dbefa8878d4df5f1f2ddb1fbeab7f42ffb8cd328bd4a"), "poc-9.ethdev.com:30303" }, { Public("a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c"), "52.16.188.185:30303" }, { Public("7f25d3eab333a6b98a8b5ed68d962bb22c876ffcd5561fca54e3c2ef27f754df6f7fd7c9b74cc919067abac154fb8e1f8385505954f161ae440abc355855e034"), "54.207.93.166:30303" } };