diff --git a/src/dfi/consensus/icxorders.cpp b/src/dfi/consensus/icxorders.cpp index bbb215a665..8150ba5f71 100644 --- a/src/dfi/consensus/icxorders.cpp +++ b/src/dfi/consensus/icxorders.cpp @@ -559,16 +559,19 @@ Res CICXOrdersConsensus::operator()(const CICXClaimDFCHTLCMessage &obj) const { return res; } - CTxDestination dest; - ExtractDestination(order->ownerAddress, dest); - UniValue result(UniValue::VOBJ); - result.pushKV("order_tx", order->creationTx.ToString()); - result.pushKV("offer_tx", dfchtlc->offerTx.ToString()); - result.pushKV("dfchtlc_tx", dfchtlc->creationTx.ToString()); - result.pushKV("claim_tx", tx.GetHash().ToString()); - result.pushKV("address", EncodeDestination(dest)); - result.pushKV("amount", GetDecimalString(offer->takerFee * 50 / 100)); - LogPrintf("ICXBug %s\n", result.write(0)); + if (LogAcceptCategory(BCLog::ICXBUG)) { + CTxDestination dest; + if (ExtractDestination(order->ownerAddress, dest)) { + UniValue result(UniValue::VOBJ); + result.pushKV("order_tx", order->creationTx.ToString()); + result.pushKV("offer_tx", dfchtlc->offerTx.ToString()); + result.pushKV("dfchtlc_tx", dfchtlc->creationTx.ToString()); + result.pushKV("claim_tx", tx.GetHash().ToString()); + result.pushKV("address", EncodeDestination(dest)); + result.pushKV("amount", GetDecimalString(offer->takerFee * 50 / 100)); + LogPrint(BCLog::ICXBUG, "%s\n", result.write(0)); + } + } } else { // Bug fixed if (auto res = TransferTokenBalance(DCT_ID{0}, offer->takerFee * 50 / 100, CScript(), order->ownerAddress); diff --git a/src/logging.cpp b/src/logging.cpp index c9c23da2b7..61afaa20b0 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -164,6 +164,7 @@ const CLogCategoryDesc LogCategories[] = {BCLog::SWAPRESULT, "swapresult"}, {BCLog::CONNECT, "connect"}, {BCLog::OCEAN, "ocean"}, + {BCLog::ICXBUG, "icxbug"}, {BCLog::ALL, "1"}, {BCLog::ALL, "all"}, }; diff --git a/src/logging.h b/src/logging.h index 2caa38cddf..b8c41341de 100644 --- a/src/logging.h +++ b/src/logging.h @@ -78,6 +78,7 @@ namespace BCLog { SIGN = (1ull << 32ull), SWAPRESULT = (1ull << 33ull), OCEAN = (1ull << 34ull), + ICXBUG = (1ull << 35ull), ALL = ~(0ull), };