refactor: Use std::format instead of boost::format where it fits (#7996)

Co-authored-by: Timur Yalymov <36795566+tyalymov@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
This commit is contained in:
Mayukha Vadari
2026-08-14 13:49:08 +00:00
committed by GitHub
parent a0074f83d3
commit d34aa37b3c
21 changed files with 286 additions and 182 deletions

View File

@@ -33,13 +33,13 @@
#include <xrpl/protocol/jss.h>
#include <boost/container/flat_set.hpp>
#include <boost/format/free_funcs.hpp>
#include <array>
#include <cstddef>
#include <cstdint>
#include <exception>
#include <expected>
#include <format>
#include <functional>
#include <memory>
#include <optional>
@@ -399,16 +399,21 @@ STTx::getMetaSQL(
TxnSql status,
std::string const& escapedMetaData) const
{
static boost::format const kBfTrans("('%s', '%s', '%s', '%d', '%d', '%c', %s, %s)");
std::string rTxn = sqlBlobLiteral(rawTxn.peekData());
auto format = TxFormats::getInstance().findByType(txType_);
XRPL_ASSERT(format, "xrpl::STTx::getMetaSQL : non-null type format");
return str(
boost::format(kBfTrans) % to_string(getTransactionID()) % format->getName() %
toBase58(getAccountID(sfAccount)) % getFieldU32(sfSequence) % inLedger %
safeCast<char>(status) % rTxn % escapedMetaData);
return std::format(
"('{}', '{}', '{}', '{}', '{}', '{}', {}, {})",
to_string(getTransactionID()),
format->getName(),
toBase58(getAccountID(sfAccount)),
getFieldU32(sfSequence),
inLedger,
safeCast<char>(status),
rTxn,
escapedMetaData);
}
static std::expected<void, std::string>