|
|
|
@ -71,6 +71,9 @@ namespace xmreg {
|
|
|
|
|
size_t version;
|
|
|
|
|
uint64_t unlock_time;
|
|
|
|
|
|
|
|
|
|
crypto::hash payment_id = null_hash; // normal
|
|
|
|
|
crypto::hash8 payment_id8 = null_hash8; // encrypted
|
|
|
|
|
|
|
|
|
|
std::vector<std::vector<crypto::signature> > signatures;
|
|
|
|
|
|
|
|
|
|
// key images of inputs
|
|
|
|
@ -88,6 +91,11 @@ namespace xmreg {
|
|
|
|
|
|
|
|
|
|
string tx_pk_str = REMOVE_HASH_BRAKETS(fmt::format("{:s}", pk));
|
|
|
|
|
|
|
|
|
|
cout << "payment_id: " << payment_id << endl;
|
|
|
|
|
|
|
|
|
|
string pid_str = REMOVE_HASH_BRAKETS(fmt::format("{:s}", payment_id));
|
|
|
|
|
string pid8_str = REMOVE_HASH_BRAKETS(fmt::format("{:s}", payment_id8));
|
|
|
|
|
|
|
|
|
|
mstch::map txd_map {
|
|
|
|
|
{"hash" , tx_hash_str},
|
|
|
|
|
{"pub_key" , tx_pk_str},
|
|
|
|
@ -98,6 +106,10 @@ namespace xmreg {
|
|
|
|
|
{"no_outputs" , output_pub_keys.size()},
|
|
|
|
|
{"mixin" , std::to_string(mixin_no - 1)},
|
|
|
|
|
{"version" , std::to_string(version)},
|
|
|
|
|
{"has_payment_id" , payment_id != null_hash},
|
|
|
|
|
{"has_payment_id8" , payment_id8 != null_hash8},
|
|
|
|
|
{"payment_id" , pid_str},
|
|
|
|
|
{"payment_id8" , pid8_str},
|
|
|
|
|
{"unlock_time" , std::to_string(unlock_time)},
|
|
|
|
|
{"tx_size" , fmt::format("{:0.4f}", static_cast<double>(size)/1024.0)}
|
|
|
|
|
};
|
|
|
|
@ -695,6 +707,9 @@ namespace xmreg {
|
|
|
|
|
tx_blk_height_str = std::to_string(tx_blk_height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// payments id. both normal and encrypted (payment_id8)
|
|
|
|
|
string pid_str = REMOVE_HASH_BRAKETS(fmt::format("{:s}", txd.payment_id));
|
|
|
|
|
string pid8_str = REMOVE_HASH_BRAKETS(fmt::format("{:s}", txd.payment_id8));
|
|
|
|
|
|
|
|
|
|
// initalise page tempate map with basic info about blockchain
|
|
|
|
|
mstch::map context {
|
|
|
|
@ -707,7 +722,11 @@ namespace xmreg {
|
|
|
|
|
{"blk_timestamp" , blk_timestamp},
|
|
|
|
|
{"delta_time" , age.first},
|
|
|
|
|
{"inputs_no" , txd.input_key_imgs.size()},
|
|
|
|
|
{"outputs_no" , txd.output_pub_keys.size()}
|
|
|
|
|
{"outputs_no" , txd.output_pub_keys.size()},
|
|
|
|
|
{"has_payment_id" , txd.payment_id != null_hash},
|
|
|
|
|
{"has_payment_id8" , txd.payment_id8 != null_hash8},
|
|
|
|
|
{"payment_id" , pid_str},
|
|
|
|
|
{"payment_id8" , pid8_str},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
string server_time_str = xmreg::timestamp_to_str(server_timestamp, "%F");
|
|
|
|
@ -944,6 +963,8 @@ namespace xmreg {
|
|
|
|
|
txd.fee = get_tx_fee(tx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_payment_id(tx, txd.payment_id, txd.payment_id8);
|
|
|
|
|
|
|
|
|
|
// get tx size in bytes
|
|
|
|
|
txd.size = get_object_blobsize(tx);
|
|
|
|
|
|
|
|
|
|