mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 07:10:53 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user