diff --git a/src/MempoolStatus.cpp b/src/MempoolStatus.cpp index 660d9be..956ccf7 100644 --- a/src/MempoolStatus.cpp +++ b/src/MempoolStatus.cpp @@ -181,7 +181,13 @@ MempoolStatus::read_mempool() last_tx.pID = 'l'; // legacy payment id else if (payment_id8 != null_hash8) last_tx.pID = 'e'; // encrypted payment id - + else if (!get_additional_tx_pub_keys_from_extra(tx).empty()) + { + // if multioutput tx have additional public keys, + // mark it so that it represents that it has at least + // one sub-address + last_tx.pID = 's'; + } // } // if (hex_to_pod(_tx_info.id_hash, mem_tx_hash)) } // for (size_t i = 0; i < mempool_tx_info.size(); ++i) diff --git a/src/page.h b/src/page.h index ff44b91..f734021 100644 --- a/src/page.h +++ b/src/page.h @@ -144,9 +144,13 @@ namespace xmreg uint64_t size; uint64_t blk_height; size_t version; + + bool has_additional_tx_pub_keys {false}; + char pID; // '-' - no payment ID, // 'l' - legacy, long 64 character payment id, // 'e' - encrypted, short, from integrated addresses + // 's' - sub-address (avaliable only for multi-output txs) uint64_t unlock_time; uint64_t no_confirmations; vector extra; @@ -208,7 +212,8 @@ namespace xmreg {"payment_id8" , pod_to_hex(payment_id8)}, {"unlock_time" , unlock_time}, {"tx_size" , fmt::format("{:0.4f}", tx_size)}, - {"tx_size_short" , fmt::format("{:0.2f}", tx_size)} + {"tx_size_short" , fmt::format("{:0.2f}", tx_size)}, + {"has_add_pks" , !additional_pks.empty()} }; @@ -6007,6 +6012,13 @@ namespace xmreg { txd.pID = 'e'; // encrypted payment id } + else if (txd.additional_pks.empty() == false) + { + // if multioutput tx have additional public keys, + // mark it so that it represents that it has at least + // one sub-address + txd.pID = 's'; + } // get tx signatures for each input txd.signatures = tx.signatures;