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

This reverts commit 72e5078de7, reversing
changes made to cfc8f8c052.
This commit is contained in:
JoelKatz
2013-05-26 15:50:21 -07:00
parent 72e5078de7
commit 5b741ac87c
8 changed files with 11 additions and 35 deletions

15
LICENSE
View File

@@ -8,21 +8,6 @@ Copyright (c) 2012 Arthur Britto
Copyright (c) 2011-2012 David Schwartz
Copyright (c) 2011-2012 Jed McCaleb
Some code:
Copyright (c) 2013 Vinnie Falco <vinnie.falco@gmail.com>
Contributions from Vinnie Falco provided under the terms of the ISC License:
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
Some code from ASIO examples:
// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//

View File

@@ -2,7 +2,7 @@
#include <boost/foreach.hpp>
TaggedCache<uint256, AcceptedLedger> AcceptedLedger::ALCache("AcceptedLedger", 8, 120);
TaggedCache<uint256, AcceptedLedger> AcceptedLedger::ALCache("AcceptedLedger", 4, 60);
ALTransaction::ALTransaction(uint32 seq, SerializerIterator& sit)
{

View File

@@ -107,17 +107,14 @@ LedgerAcquire::LedgerAcquire(const uint256& hash, uint32 seq) : PeerSet(hash, LE
tryLocal();
}
bool LedgerAcquire::checkLocal()
void LedgerAcquire::checkLocal()
{
boost::recursive_mutex::scoped_lock sl(mLock);
if (isDone())
return false;
return;
if (!tryLocal())
return false;
done();
return true;
if (tryLocal())
done();
}
bool LedgerAcquire::tryLocal()
@@ -1067,20 +1064,13 @@ void LedgerAcquireMaster::gotFetchPack(Job&)
acquires.reserve(mLedgers.size());
typedef std::pair<uint256, LedgerAcquire::pointer> u256_acq_pair;
BOOST_FOREACH(const u256_acq_pair& it, mLedgers)
{
acquires.push_back(it.second);
}
}
int completed = 0;
BOOST_FOREACH(const LedgerAcquire::pointer& acquire, acquires)
{
if (acquire->checkLocal())
++completed;
acquire->checkLocal();
}
if (completed > 0)
theApp->getLedgerMaster().resumeAcquiring();
}
// vim:ts=4

View File

@@ -130,7 +130,7 @@ public:
void addPeers();
void awaitData();
void noAwaitData();
bool checkLocal();
void checkLocal();
typedef std::pair<ripple::TMGetObjectByHash::ObjectType, uint256> neededHash_t;
std::vector<neededHash_t> getNeededHashes();

View File

@@ -2131,7 +2131,7 @@ void NetworkOPs::gotFetchPack(bool progress, uint32 seq)
mLastFetchPack = 0;
mFetchSeq = seq; // earliest pack we have data on
theApp->getJobQueue().addJob(jtLEDGER_DATA, "gotFetchPack",
BIND_TYPE(&LedgerAcquireMaster::gotFetchPack, &theApp->getMasterLedgerAcquire(), P_1));
boost::bind(&LedgerAcquireMaster::gotFetchPack, &theApp->getMasterLedgerAcquire(), _1));
}
void NetworkOPs::missingNodeInLedger(uint32 seq)

View File

@@ -3486,7 +3486,7 @@ Json::Value RPCHandler::doCommand(const Json::Value& jvRequest, int iRole, int &
{ "path_find", &RPCHandler::doPathFind, false, optCurrent },
{ "ping", &RPCHandler::doPing, false, optNone },
// { "profile", &RPCHandler::doProfile, false, optCurrent },
{ "proof_create", &RPCHandler::doProofCreate, true, optNone },
{ "proof_create", &RPCHandler::doProofCreate, false, optNone },
{ "proof_solve", &RPCHandler::doProofSolve, true, optNone },
{ "proof_verify", &RPCHandler::doProofVerify, true, optNone },
{ "random", &RPCHandler::doRandom, false, optNone },

View File

@@ -260,6 +260,7 @@ SHAMapTreeNode* SHAMap::getNodePointer(const SHAMapNode& id, const uint256& hash
}
}
void SHAMap::returnNode(SHAMapTreeNode::pointer& node, bool modify)
{ // make sure the node is suitable for the intended operation (copy on write)
assert(node->isValid());

View File

@@ -126,7 +126,7 @@ std::vector<uint256> SHAMap::getNeededHashes(int max, SHAMapSyncFilter* filter)
try
{
d = getNodePointer(childID, childHash, filter);
if (d->isInner())
if (d->isInner() && !d->isFullBelow())
{
have_all = false;
stack.push(d);