book subscribe

This commit is contained in:
jed
2013-03-09 11:42:59 -08:00
parent 56dd20bc28
commit 87c97fc652
5 changed files with 22 additions and 6 deletions

View File

@@ -39,6 +39,7 @@
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<TargetName>rippled</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
@@ -293,6 +294,7 @@
<ClInclude Include="util\pugixml.hpp" /> <ClInclude Include="util\pugixml.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="debug.cfg" />
<None Include="html\newcoin.html"> <None Include="html\newcoin.html">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>

View File

@@ -357,6 +357,9 @@
<ClCompile Include="src\cpp\ripple\RPCSub.cpp"> <ClCompile Include="src\cpp\ripple\RPCSub.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\cpp\ripple\FeatureTable.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="util\pugiconfig.hpp"> <ClInclude Include="util\pugiconfig.hpp">
@@ -642,13 +645,15 @@
<Filter>html</Filter> <Filter>html</Filter>
</None> </None>
<None Include="SConstruct" /> <None Include="SConstruct" />
<None Include="newcoind.cfg" />
<None Include="validators.txt" />
<None Include="README" /> <None Include="README" />
<None Include="test\buster.js" /> <None Include="test\buster.js" />
<None Include="test\server.js" /> <None Include="test\server.js" />
<None Include="test\standalone-test.js" /> <None Include="test\standalone-test.js" />
<None Include="test\utils.js" /> <None Include="test\utils.js" />
<None Include="ripple-example.txt" />
<None Include="rippled-example.cfg" />
<None Include="validators-example.txt" />
<None Include="debug.cfg" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="src\cpp\ripple\ripple.proto" /> <CustomBuild Include="src\cpp\ripple\ripple.proto" />

View File

@@ -528,6 +528,7 @@ int PeerSet::getPeerCount() const
void LedgerAcquire::filterNodes(std::vector<SHAMapNode>& nodeIDs, std::vector<uint256>& nodeHashes, void LedgerAcquire::filterNodes(std::vector<SHAMapNode>& nodeIDs, std::vector<uint256>& nodeHashes,
std::set<SHAMapNode>& recentNodes, int max, bool aggressive) std::set<SHAMapNode>& recentNodes, int max, bool aggressive)
{ // ask for new nodes in preference to ones we've already asked for { // ask for new nodes in preference to ones we've already asked for
assert(nodeHashes.size() == nodeIDs.size() );
std::vector<bool> duplicates; std::vector<bool> duplicates;
duplicates.reserve(nodeIDs.size()); duplicates.reserve(nodeIDs.size());

View File

@@ -1696,7 +1696,7 @@ Json::Value RPCHandler::doAccountTransactions(Json::Value jvRequest, int& cost)
try try
{ {
#endif #endif
int vl = mNetOps->getValidatedSeq(); unsigned int vl = mNetOps->getValidatedSeq();
ScopedUnlock su(theApp->getMasterLock()); ScopedUnlock su(theApp->getMasterLock());
Json::Value ret(Json::objectValue); Json::Value ret(Json::objectValue);
@@ -2729,11 +2729,19 @@ Json::Value RPCHandler::doSubscribe(Json::Value jvRequest, int& cost)
if(currencyIn.isNonZero()) if(currencyIn.isNonZero())
STAmount::issuerFromString(issuerIn,(*it)["IssuerIn"].asString()); STAmount::issuerFromString(issuerIn,(*it)["IssuerIn"].asString());
bool bothSides=false;
if((*it).isMember("BothSides") && (*it)["BothSides"].asBool()) bothSides=true;
mNetOps->subBook(ispSub, currencyIn, currencyOut, issuerIn, issuerOut); mNetOps->subBook(ispSub, currencyIn, currencyOut, issuerIn, issuerOut);
if(bothSides) mNetOps->subBook(ispSub, currencyOut, currencyIn, issuerOut, issuerIn);
if((*it)["StateNow"].asBool()) if((*it)["StateNow"].asBool())
{ {
//lpLedger = theApp->getLedgerMaster().getClosedLedger(); Ledger::pointer ledger= theApp->getLedgerMaster().getClosedLedger();
//mNetOps->getBookPage(lpLedger, uTakerPaysCurrencyID, uTakerPaysIssuerID, uTakerGetsCurrencyID, uTakerGetsIssuerID, raTakerID.getAccountID(), false, iLimit, jvMarker, jvResult); RippleAddress raTakerID;
raTakerID.setAccountID(ACCOUNT_ONE);
const Json::Value jvMarker = Json::Value(Json::nullValue);
mNetOps->getBookPage(ledger, currencyOut, issuerOut, currencyIn, issuerIn, raTakerID.getAccountID(), false, 0, jvMarker, jvResult);
if(bothSides) mNetOps->getBookPage(ledger, currencyIn, issuerIn, currencyOut, issuerOut, raTakerID.getAccountID(), false, 0, jvMarker, jvResult);
} }
} }
} }