Merge branch 'master' of github.com:jedmccaleb/NewCoin

This commit is contained in:
Arthur Britto
2012-06-02 12:00:25 -07:00
3 changed files with 3 additions and 8 deletions

View File

@@ -669,6 +669,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
std::deque<SerializedTransaction::pointer> failedTransactions;
applyTransactions(set, newLCL, failedTransactions);
newLCL->setClosed();
newLCL->setAccepted();
newLCL->updateHash();
uint256 newLCLHash = newLCL->getHash();

View File

@@ -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<const std::size_t *>(mn.getNodeID().begin())
^ *reinterpret_cast<const std::size_t *>(mNonce.begin());
^ *reinterpret_cast<const std::size_t *>(theApp->getNonce256().begin());
}
std::size_t hash_SMN::operator() (const uint256& u) const
{
return *reinterpret_cast<const std::size_t *>(u.begin())
^ *reinterpret_cast<const std::size_t *>(mNonce.begin());
^ *reinterpret_cast<const std::size_t *>(theApp->getNonce256().begin());
}
SHAMap::SHAMap(uint32 seq) : mSeq(seq), mState(Modifying)

View File

@@ -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;