|
|
|
@ -323,10 +323,6 @@ struct tx_details
|
|
|
|
|
|
|
|
|
|
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<uint8_t> extra;
|
|
|
|
@ -334,8 +330,6 @@ struct tx_details
|
|
|
|
|
crypto::hash payment_id = null_hash; // normal
|
|
|
|
|
crypto::hash8 payment_id8 = null_hash8; // encrypted
|
|
|
|
|
|
|
|
|
|
string payment_id_as_ascii;
|
|
|
|
|
|
|
|
|
|
std::vector<std::vector<crypto::signature>> signatures;
|
|
|
|
|
|
|
|
|
|
// key images of inputs
|
|
|
|
@ -395,7 +389,6 @@ struct tx_details
|
|
|
|
|
{"version" , static_cast<uint64_t>(version)},
|
|
|
|
|
{"has_payment_id" , payment_id != null_hash},
|
|
|
|
|
{"has_payment_id8" , payment_id8 != null_hash8},
|
|
|
|
|
{"pID" , string {pID}},
|
|
|
|
|
{"payment_id" , pod_to_hex(payment_id)},
|
|
|
|
|
{"confirmations" , no_confirmations},
|
|
|
|
|
{"extra" , get_extra_str()},
|
|
|
|
@ -939,7 +932,6 @@ mempool(bool add_header_and_footer = false, uint64_t no_of_mempool_tx = 25)
|
|
|
|
|
{"xmr_outputs" , mempool_tx.xmr_outputs_str},
|
|
|
|
|
{"no_inputs" , mempool_tx.no_inputs},
|
|
|
|
|
{"no_outputs" , mempool_tx.no_outputs},
|
|
|
|
|
{"pID" , string {mempool_tx.pID}},
|
|
|
|
|
{"no_nonrct_inputs", mempool_tx.num_nonrct_inputs},
|
|
|
|
|
{"mixin" , mempool_tx.mixin_no},
|
|
|
|
|
{"txsize" , mempool_tx.txsize}
|
|
|
|
@ -6044,9 +6036,6 @@ construct_tx_context(transaction tx, uint16_t with_ring_signatures = 0)
|
|
|
|
|
|
|
|
|
|
string tx_json = obj_to_json_str(tx);
|
|
|
|
|
|
|
|
|
|
// use this regex to remove all non friendly characters in payment_id_as_ascii string
|
|
|
|
|
static std::regex e {"[^a-zA-Z0-9 ./\\\\!]"};
|
|
|
|
|
|
|
|
|
|
double tx_size = static_cast<double>(txd.size) / 1024.0;
|
|
|
|
|
|
|
|
|
|
double payed_for_kB = XMR_AMOUNT(txd.fee) / tx_size;
|
|
|
|
@ -6075,7 +6064,6 @@ construct_tx_context(transaction tx, uint16_t with_ring_signatures = 0)
|
|
|
|
|
{"has_payment_id8" , txd.payment_id8 != null_hash8},
|
|
|
|
|
{"confirmations" , txd.no_confirmations},
|
|
|
|
|
{"payment_id" , pid_str},
|
|
|
|
|
{"payment_id_as_ascii" , remove_bad_chars(txd.payment_id_as_ascii)},
|
|
|
|
|
{"payment_id8" , pid8_str},
|
|
|
|
|
{"extra" , txd.get_extra_str()},
|
|
|
|
|
{"with_ring_signatures" , static_cast<bool>(
|
|
|
|
@ -6542,8 +6530,6 @@ get_tx_details(const transaction& tx,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
txd.pID = '-'; // no payment ID
|
|
|
|
|
|
|
|
|
|
get_payment_id(tx, txd.payment_id, txd.payment_id8);
|
|
|
|
|
|
|
|
|
|
// get tx size in bytes
|
|
|
|
@ -6551,23 +6537,6 @@ get_tx_details(const transaction& tx,
|
|
|
|
|
|
|
|
|
|
txd.extra = tx.extra;
|
|
|
|
|
|
|
|
|
|
if (txd.payment_id != null_hash)
|
|
|
|
|
{
|
|
|
|
|
txd.payment_id_as_ascii = std::string(txd.payment_id.data, crypto::HASH_SIZE);
|
|
|
|
|
txd.pID = 'l'; // legacy payment id
|
|
|
|
|
}
|
|
|
|
|
else if (txd.payment_id8 != null_hash8)
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|