diff --git a/src/LedgerConsensus.cpp b/src/LedgerConsensus.cpp index 218ee185b..bb659d721 100644 --- a/src/LedgerConsensus.cpp +++ b/src/LedgerConsensus.cpp @@ -669,6 +669,7 @@ void LedgerConsensus::accept(SHAMap::pointer set) std::deque failedTransactions; applyTransactions(set, newLCL, failedTransactions); + newLCL->setClosed(); newLCL->setAccepted(); newLCL->updateHash(); uint256 newLCLHash = newLCL->getHash(); diff --git a/src/SHAMap.cpp b/src/SHAMap.cpp index 1329cb81c..9188e4997 100644 --- a/src/SHAMap.cpp +++ b/src/SHAMap.cpp @@ -15,19 +15,17 @@ #include "SHAMap.h" #include "Application.h" -uint256 hash_SMN::mNonce; - std::size_t hash_SMN::operator() (const SHAMapNode& mn) const { return mn.getDepth() ^ *reinterpret_cast(mn.getNodeID().begin()) - ^ *reinterpret_cast(mNonce.begin()); + ^ *reinterpret_cast(theApp->getNonce256().begin()); } std::size_t hash_SMN::operator() (const uint256& u) const { return *reinterpret_cast(u.begin()) - ^ *reinterpret_cast(mNonce.begin()); + ^ *reinterpret_cast(theApp->getNonce256().begin()); } SHAMap::SHAMap(uint32 seq) : mSeq(seq), mState(Modifying) diff --git a/src/SHAMap.h b/src/SHAMap.h index 09398794a..82795e979 100644 --- a/src/SHAMap.h +++ b/src/SHAMap.h @@ -80,10 +80,6 @@ class hash_SMN { public: - static uint256 mNonce; - - static void setNonce(const uint256& nonce) { mNonce = nonce; } - std::size_t operator() (const SHAMapNode& mn) const; std::size_t operator() (const uint256& u) const;