20 #include <ripple/app/ledger/LedgerMaster.h>
21 #include <ripple/app/main/Application.h>
22 #include <ripple/app/misc/NetworkOPs.h>
23 #include <ripple/app/misc/Transaction.h>
24 #include <ripple/ledger/ReadView.h>
25 #include <ripple/net/RPCErr.h>
26 #include <ripple/protocol/ErrorCodes.h>
27 #include <ripple/protocol/jss.h>
28 #include <ripple/resource/Fees.h>
29 #include <ripple/rpc/Context.h>
30 #include <ripple/rpc/DeliveredAmount.h>
31 #include <ripple/rpc/Role.h>
32 #include <ripple/rpc/impl/RPCHelpers.h>
71 auto const raAccount =
84 context.
params[jss::ledger_index_min] = context.
params[jss::ledger_min];
91 context.
params[jss::ledger_index_max] = context.
params[jss::ledger_max];
105 if (!bValidated && (iLedgerMin == -1 || iLedgerMax == -1))
113 uLedgerMin = iLedgerMin == -1 ? uValidatedMin : iLedgerMin;
114 uLedgerMax = iLedgerMax == -1 ? uValidatedMax : iLedgerMax;
116 if (uLedgerMax < uLedgerMin)
131 if (!ret[jss::validated].asBool() ||
132 (ledger->
info().
seq > uValidatedMax) ||
133 (ledger->
info().
seq < uValidatedMin))
138 uLedgerMin = uLedgerMax = ledger->
info().
seq;
165 for (
auto it = txns.begin(), end = txns.end(); it != end; ++it)
171 jvObj[jss::tx_blob] =
strHex(std::get<0>(*it));
172 jvObj[jss::meta] =
strHex(std::get<1>(*it));
173 jvObj[jss::ledger_index] = uLedgerIndex;
174 jvObj[jss::validated] = bValidated &&
175 uValidatedMin <= uLedgerIndex &&
176 uValidatedMax >= uLedgerIndex;
190 for (
auto it = txns.begin(), end = txns.end(); it != end; ++it)
204 insertDeliveredAmount(
205 meta, context, it->first, *it->second);
206 jvObj[jss::meta] = std::move(meta);
208 jvObj[jss::validated] = bValidated &&
209 uValidatedMin <= uLedgerIndex &&
210 uValidatedMax >= uLedgerIndex;
216 ret[jss::ledger_index_min] = uLedgerMin;
217 ret[jss::ledger_index_max] = uLedgerMax;
218 ret[jss::validated] = bValidated && uValidatedMin <= uLedgerMin &&
219 uValidatedMax >= uLedgerMax;
220 ret[jss::offset] = offset;
226 ret[jss::count] = count;
229 ret[jss::limit] = limit;