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

This commit is contained in:
Arthur Britto
2012-11-22 14:03:42 -08:00
5 changed files with 9 additions and 9 deletions

View File

@@ -46,7 +46,7 @@ public:
static const int sMD_DeleteFinal = 0x04; // final value when it is deleted static const int sMD_DeleteFinal = 0x04; // final value when it is deleted
static const int sMD_Create = 0x08; // value when it's created static const int sMD_Create = 0x08; // value when it's created
static const int sMD_Always = 0x10; // value when node containing it is affected at all static const int sMD_Always = 0x10; // value when node containing it is affected at all
static const int sMD_Default = sMD_ChangeOrig | sMD_ChangeNew | sMD_DeleteFinal; static const int sMD_Default = sMD_ChangeOrig | sMD_ChangeNew | sMD_DeleteFinal | sMD_Create;
protected: protected:
static std::map<int, ptr> codeToField; static std::map<int, ptr> codeToField;

View File

@@ -419,7 +419,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
prevs.addObject(obj); prevs.addObject(obj);
} }
if (!prevs.empty()) if (!prevs.empty())
mSet.getAffectedNode(it.first, *type).addObject(prevs); mSet.getAffectedNode(it.first).addObject(prevs);
STObject finals(sfFinalFields); STObject finals(sfFinalFields);
BOOST_FOREACH(const SerializedType& obj, *curNode) BOOST_FOREACH(const SerializedType& obj, *curNode)
@@ -428,7 +428,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
finals.addObject(obj); finals.addObject(obj);
} }
if (!finals.empty()) if (!finals.empty())
mSet.getAffectedNode(it.first, *type).addObject(finals); mSet.getAffectedNode(it.first).addObject(finals);
} }
else if (type == &sfModifiedNode) else if (type == &sfModifiedNode)
{ {
@@ -442,7 +442,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
prevs.addObject(obj); prevs.addObject(obj);
} }
if (!prevs.empty()) if (!prevs.empty())
mSet.getAffectedNode(it.first, *type).addObject(prevs); mSet.getAffectedNode(it.first).addObject(prevs);
STObject finals(sfFinalFields); STObject finals(sfFinalFields);
BOOST_FOREACH(const SerializedType& obj, *curNode) BOOST_FOREACH(const SerializedType& obj, *curNode)
@@ -451,7 +451,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
finals.addObject(obj); finals.addObject(obj);
} }
if (!finals.empty()) if (!finals.empty())
mSet.getAffectedNode(it.first, *type).addObject(finals); mSet.getAffectedNode(it.first).addObject(finals);
} }
else if (type == &sfCreatedNode) // if created, thread to owner(s) else if (type == &sfCreatedNode) // if created, thread to owner(s)
{ {
@@ -460,6 +460,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
if (curNode->isThreadedType()) // always thread to self if (curNode->isThreadedType()) // always thread to self
threadTx(curNode, mLedger, newMod); threadTx(curNode, mLedger, newMod);
STObject news(sfNewFields); STObject news(sfNewFields);
BOOST_FOREACH(const SerializedType& obj, *curNode) BOOST_FOREACH(const SerializedType& obj, *curNode)
{ // save non-default values { // save non-default values
@@ -467,7 +468,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result)
news.addObject(obj); news.addObject(obj);
} }
if (!news.empty()) if (!news.empty())
mSet.getAffectedNode(it.first, *type).addObject(news); mSet.getAffectedNode(it.first).addObject(news);
} }
} }

View File

@@ -69,7 +69,7 @@ public:
assert(mRunning); assert(mRunning);
mRunning = false; mRunning = false;
mMonitor.addCountAndLatency(mCount, mMonitor.addCountAndLatency(mCount,
(boost::posix_time::microsec_clock::universal_time() - mStartTime).total_milliseconds()); static_cast<int>((boost::posix_time::microsec_clock::universal_time() - mStartTime).total_milliseconds()));
} }
}; };

View File

@@ -486,7 +486,6 @@ BOOST_AUTO_TEST_CASE( SHAMapSync_test )
BOOST_FAIL("NodeSize"); BOOST_FAIL("NodeSize");
} }
SMAddNode node();
if (!destination.addRootNode(*gotNodes.begin(), snfWIRE, NULL)) if (!destination.addRootNode(*gotNodes.begin(), snfWIRE, NULL))
{ {
cLog(lsFATAL) << "AddRootNode fails"; cLog(lsFATAL) << "AddRootNode fails";

View File

@@ -312,7 +312,7 @@ public:
void setValue(const STAmount &); void setValue(const STAmount &);
virtual bool isEquivalent(const SerializedType& t) const; virtual bool isEquivalent(const SerializedType& t) const;
virtual bool isDefault() const { return mValue == 0 && mIssuer.isZero() && mCurrency.isZero(); } virtual bool isDefault() const { return (mValue == 0) && mIssuer.isZero() && mCurrency.isZero(); }
bool operator==(const STAmount&) const; bool operator==(const STAmount&) const;
bool operator!=(const STAmount&) const; bool operator!=(const STAmount&) const;