From 432db7e6da4bd58d915457d5ad66160dae6ce7b9 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Mon, 20 Nov 2017 08:39:08 +0800 Subject: [PATCH] proving raw tx added --- main.cpp | 14 +++++++++----- src/page.h | 2 +- src/rpccalls.h | 3 ++- src/templates/partials/tx_details.html | 2 ++ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index e7ba34e..aa17fbf 100644 --- a/main.cpp +++ b/main.cpp @@ -342,14 +342,18 @@ main(int ac, const char* av[]) "tx hash not provided"); } - string tx_hash = post_body["txhash"];; - string tx_prv_key = post_body["txprvkey"];; - string xmr_address = post_body["xmraddress"];; + string tx_hash = post_body["txhash"]; + string tx_prv_key = post_body["txprvkey"]; + string xmr_address = post_body["xmraddress"]; + + // this will be only not empty when checking raw tx data + // using tx pusher + string raw_tx_data = post_body["raw_tx_data"]; string domain = get_domain(req); return xmrblocks.show_prove(tx_hash, xmr_address, - tx_prv_key, domain); + tx_prv_key, raw_tx_data, domain); }); @@ -360,7 +364,7 @@ main(int ac, const char* av[]) string domain = get_domain(req); return xmrblocks.show_prove(tx_hash, xmr_address, - tx_prv_key, domain); + tx_prv_key, string {}, domain); }); if (enable_pusher) diff --git a/src/page.h b/src/page.h index d6b60cf..474797c 100644 --- a/src/page.h +++ b/src/page.h @@ -2191,9 +2191,9 @@ namespace xmreg show_prove(string tx_hash_str, string xmr_address_str, string tx_prv_key_str, + string const& raw_tx_data, string domain) { - string raw_tx_data {""}; // not using it in prove tx. only for outputs return show_my_outputs(tx_hash_str, xmr_address_str, tx_prv_key_str, raw_tx_data, diff --git a/src/rpccalls.h b/src/rpccalls.h index cbe14ca..1e8ef83 100644 --- a/src/rpccalls.h +++ b/src/rpccalls.h @@ -9,6 +9,7 @@ #include "monero_headers.h" #include +#include @@ -23,7 +24,7 @@ struct has_destructor { // has destructor template - static std::true_type test(decltype(declval().~A()) *) + static std::true_type test(decltype(std::declval().~A()) *) { return std::true_type(); } diff --git a/src/templates/partials/tx_details.html b/src/templates/partials/tx_details.html index eca5f79..cf431d6 100644 --- a/src/templates/partials/tx_details.html +++ b/src/templates/partials/tx_details.html @@ -113,6 +113,8 @@


+ +