add seq to offer json

This commit is contained in:
jed
2012-12-10 12:05:50 -08:00
parent 35ec825d8c
commit eea2739f53
5 changed files with 8 additions and 4 deletions

View File

@@ -125,6 +125,7 @@
<ClCompile Include="src\cpp\ripple\LedgerMaster.cpp" />
<ClCompile Include="src\cpp\ripple\LedgerProposal.cpp" />
<ClCompile Include="src\cpp\ripple\LedgerTiming.cpp" />
<ClCompile Include="src\cpp\ripple\LoadManager.cpp" />
<ClCompile Include="src\cpp\ripple\LoadMonitor.cpp" />
<ClCompile Include="src\cpp\ripple\Log.cpp" />
<ClCompile Include="src\cpp\ripple\main.cpp" />
@@ -183,7 +184,6 @@
<ClCompile Include="src\cpp\ripple\ValidationCollection.cpp" />
<ClCompile Include="src\cpp\ripple\Wallet.cpp" />
<ClCompile Include="src\cpp\ripple\WalletAddTransactor.cpp" />
<ClCompile Include="src\cpp\ripple\WSConnection.cpp" />
<ClCompile Include="src\cpp\ripple\WSDoor.cpp" />
<ClCompile Include="src\cpp\ripple\WSHandler.cpp" />
<ClCompile Include="src\cpp\websocketpp\src\base64\base64.cpp" />

View File

@@ -276,9 +276,6 @@
<ClCompile Include="src\cpp\ripple\Wallet.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\cpp\ripple\WSConnection.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\cpp\ripple\WSDoor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -360,6 +357,9 @@
<ClCompile Include="src\cpp\ripple\WSHandler.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\cpp\ripple\LoadManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="util\pugiconfig.hpp">

View File

@@ -12,4 +12,5 @@ Offer::Offer(SerializedLedgerEntry::pointer ledgerEntry) : AccountItem(ledgerEnt
mAccount=mLedgerEntry->getFieldAccount(sfAccount);
mTakerGets = mLedgerEntry->getFieldAmount(sfTakerGets);
mTakerPays = mLedgerEntry->getFieldAmount(sfTakerPays);
mSeq = mLedgerEntry->getFieldU32(sfSequence);
}

View File

@@ -6,6 +6,7 @@ class Offer : public AccountItem
RippleAddress mAccount;
STAmount mTakerGets;
STAmount mTakerPays;
int mSeq;
Offer(SerializedLedgerEntry::pointer ledgerEntry); // For accounts in a ledger
@@ -17,5 +18,6 @@ public:
STAmount getTakerPays(){ return(mTakerPays); }
STAmount getTakerGets(){ return(mTakerGets); }
RippleAddress getAccount(){ return(mAccount); }
int getSeq(){ return(mSeq); }
};

View File

@@ -643,6 +643,7 @@ Json::Value RPCHandler::doAccountOffers(Json::Value jvRequest)
//obj["account"] = account.humanAccountID();
obj["taker_pays"] = takerPays.getJson(0);
obj["taker_gets"] = takerGets.getJson(0);
obj["seq"] = offer->getSeq();
jsonLines.append(obj);
}