mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add Env::meta()
This commit is contained in:
committed by
Nik Bougalis
parent
13b33b5d4d
commit
2cc12b2f2f
@@ -344,6 +344,17 @@ public:
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Return metadata for the last JTx.
|
||||
|
||||
Effects:
|
||||
|
||||
The open ledger is closed as if by a call
|
||||
to close(). The metadata for the last
|
||||
transaction ID, if any, is returned.
|
||||
*/
|
||||
std::shared_ptr<STObject const>
|
||||
meta();
|
||||
|
||||
private:
|
||||
void
|
||||
fund (bool setDefaultRipple,
|
||||
@@ -446,6 +457,7 @@ protected:
|
||||
int trace_ = 0;
|
||||
bool testing_ = true;
|
||||
TestStopwatch stopwatch_;
|
||||
uint256 txid_;
|
||||
|
||||
void
|
||||
autofill_sig (JTx& jt);
|
||||
|
||||
@@ -258,6 +258,7 @@ Env::submit (JTx const& jt)
|
||||
auto const& stx = jt.stx;
|
||||
if (stx)
|
||||
{
|
||||
txid_ = stx->getTransactionID();
|
||||
openLedger.modify(
|
||||
[&](OpenView& view, beast::Journal j)
|
||||
{
|
||||
@@ -297,6 +298,14 @@ Env::submit (JTx const& jt)
|
||||
// held.insert(stx);
|
||||
}
|
||||
|
||||
std::shared_ptr<STObject const>
|
||||
Env::meta()
|
||||
{
|
||||
close();
|
||||
auto const item = closed()->txRead(txid_);
|
||||
return item.second;
|
||||
}
|
||||
|
||||
void
|
||||
Env::autofill_sig (JTx& jt)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user