Address PR comments

Signed-off-by: JCW <a1q123456@users.noreply.github.com>
This commit is contained in:
JCW
2026-03-24 16:59:19 +00:00
parent c867547d2d
commit af15f7672e
3 changed files with 78 additions and 32 deletions

View File

@@ -47,6 +47,28 @@ inner::operator()(Env& env, JTx& jt) const
batchTransaction[jss::RawTransaction] = txn_;
}
Json::Value
make(
jtx::Account const& account,
uint32_t seq,
STAmount const& fee,
std::uint32_t flags,
std::vector<Json::Value> const& txns,
std::uint32_t innerStartSeq,
std::optional<std::uint32_t> const& ticket)
{
auto jv = outer(account, seq, fee, flags);
for (std::size_t i = 0; i < txns.size(); ++i)
{
inner in(txns[i], innerStartSeq + static_cast<std::uint32_t>(i), ticket);
auto const index = jv[jss::RawTransactions].size();
Json::Value& batchTransaction = jv[jss::RawTransactions][index];
batchTransaction = Json::Value{};
batchTransaction[jss::RawTransaction] = in.getTxn();
}
return jv;
}
void
sig::operator()(Env& env, JTx& jt) const
{