diff --git a/src/xrpld/app/misc/NetworkOPs.cpp b/src/xrpld/app/misc/NetworkOPs.cpp index 3ecb2a4e1c..e4c16bd85c 100644 --- a/src/xrpld/app/misc/NetworkOPs.cpp +++ b/src/xrpld/app/misc/NetworkOPs.cpp @@ -1561,10 +1561,16 @@ NetworkOPsImp::processTransaction( { if (auto const* fmt = TxFormats::getInstance().findByType(stx->getTxnType())) span->setAttribute(tx_span::attr::txType, fmt->getName().c_str()); + // xrp() throws on a non-XRP fee. preflight rejects such a + // transaction with temBAD_FEE, so leave the attribute out rather + // than let tracing turn that into an internal error. + if (auto const& fee = stx->getFieldAmount(sfFee); fee.native()) + { + span->setAttribute( + tx_span::attr::fee, static_cast(fee.xrp().drops())); + } span->setAttribute( - tx_span::attr::fee, static_cast(stx->getFieldAmount(sfFee).xrp().drops())); - span->setAttribute( - tx_span::attr::sequence, static_cast(stx->getSeqProxy().value())); + tx_span::attr::sequence, static_cast(stx->getSeqProxy().value())); } }