This commit is contained in:
wowario 2018-12-11 18:43:06 +03:00
parent 90cd28c16c
commit 71754a3d33
No known key found for this signature in database
GPG key ID: 24DCBE762DE9C111
16 changed files with 57 additions and 57 deletions

View file

@ -14,7 +14,7 @@ endif()
if (NOT MONERO_DIR)
set(MONERO_DIR ~/monero)
set(MONERO_DIR ~/wownero)
endif()
message(STATUS MONERO_DIR ": ${MONERO_DIR}")

View file

@ -173,9 +173,9 @@ main(int ac, const char* av[])
string deamon_url {*deamon_url_opt};
if (testnet && deamon_url == "http:://127.0.0.1:18081")
deamon_url = "http:://127.0.0.1:28081";
if (stagenet && deamon_url == "http:://127.0.0.1:18081")
if (testnet && deamon_url == "http:://127.0.0.1:34568")
deamon_url = "http:://127.0.0.1:11181";
if (stagenet && deamon_url == "http:://127.0.0.1:34568")
deamon_url = "http:://127.0.0.1:38081";
uint64_t mempool_info_timeout {5000};
@ -360,7 +360,7 @@ main(int ac, const char* av[])
|| post_body.count("viewkey") == 0
|| post_body.count("tx_hash") == 0)
{
return string("xmr address, viewkey or tx hash not provided");
return string("wow address, viewkey or tx hash not provided");
}
string tx_hash = remove_bad_chars(post_body["tx_hash"]);
@ -402,7 +402,7 @@ main(int ac, const char* av[])
|| post_body.count("txprvkey") == 0
|| post_body.count("txhash") == 0)
{
return string("xmr address, tx private key or "
return string("wow address, tx private key or "
"tx hash not provided");
}

View file

@ -18,7 +18,7 @@ namespace xmreg
p.add("txhash", -1);
options_description desc(
"xmrblocks, Onion Monero Blockchain Explorer");
"xmrblocks, Wownero Blockchain Explorer");
desc.add_options()
("help,h", value<bool>()->default_value(false)->implicit_value(true),
@ -50,7 +50,7 @@ namespace xmreg
("enable-autorefresh-option", value<bool>()->default_value(false)->implicit_value(true),
"enable users to have the index page on autorefresh")
("enable-emission-monitor", value<bool>()->default_value(false)->implicit_value(true),
"enable Monero total emission monitoring thread")
"enable Wownero total emission monitoring thread")
("port,p", value<string>()->default_value("8081"),
"default explorer port")
("bindaddr,x", value<string>()->default_value("0.0.0.0"),
@ -68,13 +68,13 @@ namespace xmreg
("mempool-refresh-time", value<string>()->default_value("5"),
"time, in seconds, for each refresh of mempool state")
("bc-path,b", value<string>(),
"path to lmdb folder of the blockchain, e.g., ~/.bitmonero/lmdb")
"path to lmdb folder of the blockchain, e.g., ~/.wownero/lmdb")
("ssl-crt-file", value<string>(),
"path to crt file for ssl (https) functionality")
("ssl-key-file", value<string>(),
"path to key file for ssl (https) functionality")
("deamon-url,d", value<string>()->default_value("http:://127.0.0.1:18081"),
"Monero deamon url");
("deamon-url,d", value<string>()->default_value("http:://127.0.0.1:34568"),
"Wownero deamon url");
store(command_line_parser(acc, avv)

View file

@ -297,13 +297,13 @@ CurrentBlockchainStatus::is_thread_running()
return is_running;
}
bf::path CurrentBlockchainStatus::blockchain_path {"/home/mwo/.bitmonero/lmdb"};
bf::path CurrentBlockchainStatus::blockchain_path {"/home/mwo/.wownero/lmdb"};
cryptonote::network_type CurrentBlockchainStatus::nettype {cryptonote::network_type::MAINNET};
string CurrentBlockchainStatus::output_file {"emission_amount.txt"};
string CurrentBlockchainStatus::deamon_url {"http:://127.0.0.1:18081"};
string CurrentBlockchainStatus::deamon_url {"http:://127.0.0.1:34568"};
uint64_t CurrentBlockchainStatus::blockchain_chunk_size {10000};

View file

@ -276,7 +276,7 @@ MempoolStatus::read_network_info()
local_copy.target_height = rpc_network_info.target_height;
local_copy.difficulty = rpc_network_info.difficulty;
local_copy.target = rpc_network_info.target;
local_copy.hash_rate = (rpc_network_info.difficulty/rpc_network_info.target);
local_copy.hash_rate = (rpc_network_info.difficulty/300);
local_copy.tx_count = rpc_network_info.tx_count;
local_copy.tx_pool_size = rpc_network_info.tx_pool_size;
local_copy.alt_blocks_count = rpc_network_info.alt_blocks_count;
@ -341,8 +341,8 @@ MempoolStatus::is_thread_running()
return is_running;
}
bf::path MempoolStatus::blockchain_path {"/home/mwo/.bitmonero/lmdb"};
string MempoolStatus::deamon_url {"http:://127.0.0.1:18081"};
bf::path MempoolStatus::blockchain_path {"/home/mwo/.wownero/lmdb"};
string MempoolStatus::deamon_url {"http:://127.0.0.1:34568"};
cryptonote::network_type MempoolStatus::nettype {cryptonote::network_type::MAINNET};
atomic<bool> MempoolStatus::is_running {false};
boost::thread MempoolStatus::m_thread;

View file

@ -2069,7 +2069,7 @@ show_my_outputs(string tx_hash_str,
{"blk_height" , tx_blk_height_str},
{"tx_size" , fmt::format("{:0.4f}",
static_cast<double>(txd.size) / 1024.0)},
{"tx_fee" , xmreg::xmr_amount_to_str(txd.fee, "{:0.12f}", true)},
{"tx_fee" , xmreg::xmr_amount_to_str(txd.fee, "{:0.11f}", true)},
{"blk_timestamp" , blk_timestamp},
{"delta_time" , age.first},
{"outputs_no" , static_cast<uint64_t>(txd.output_pub_keys.size())},
@ -2620,7 +2620,7 @@ show_my_outputs(string tx_hash_str,
context["show_inputs"] = show_key_images;
context["inputs_no"] = static_cast<uint64_t>(inputs.size());
context["sum_mixin_xmr"] = xmreg::xmr_amount_to_str(
sum_mixin_xmr, "{:0.12f}", false);
sum_mixin_xmr, "{:0.11f}", false);
uint64_t possible_spending {0};
@ -2653,7 +2653,7 @@ show_my_outputs(string tx_hash_str,
}
context["possible_spending"] = xmreg::xmr_amount_to_str(
possible_spending, "{:0.12f}", false);
possible_spending, "{:0.11f}", false);
add_css_style(context);
@ -6015,9 +6015,9 @@ construct_tx_context(transaction tx, uint16_t with_ring_signatures = 0)
{"blk_height" , tx_blk_height_str},
{"tx_blk_height" , tx_blk_height},
{"tx_size" , fmt::format("{:0.4f}", tx_size)},
{"tx_fee" , xmreg::xmr_amount_to_str(txd.fee, "{:0.12f}", false)},
{"tx_fee" , xmreg::xmr_amount_to_str(txd.fee, "{:0.11f}", false)},
{"tx_fee_micro" , xmreg::xmr_amount_to_str(txd.fee*1e6, "{:0.4f}", false)},
{"payed_for_kB" , fmt::format("{:0.12f}", payed_for_kB)},
{"payed_for_kB" , fmt::format("{:0.11f}", payed_for_kB)},
{"tx_version" , static_cast<uint64_t>(txd.version)},
{"blk_timestamp" , blk_timestamp},
{"blk_timestamp_uint" , blk.timestamp},

View file

@ -81,7 +81,7 @@ class rpccalls
public:
rpccalls(string _deamon_url = "http:://127.0.0.1:18081",
rpccalls(string _deamon_url = "http:://127.0.0.1:34568",
uint64_t _timeout = 200000);
bool

View file

@ -15,7 +15,7 @@
<h4>Output keys for address: {{address}}</h4>
<h4>Viewkey: {{viewkey}}</h4>
{{#has_total_xmr}}
<h4>Total xmr: {{total_xmr}}</h4>
<h4>Total wow: {{total_xmr}}</h4>
{{/has_total_xmr}}
<div class="center">

View file

@ -2,7 +2,7 @@
<h6 style="margin-top:10px">
<a href="https://github.com/moneroexamples/onion-monero-blockchain-explorer">source code</a>
| explorer version (api): {{git_branch_name}}-{{last_git_commit_date}}-{{last_git_commit_hash}} ({{api}})
| monero version: {{monero_version_full}}
| wownero version: {{monero_version_full}}
</h6>
</div>
</body>

View file

@ -6,7 +6,7 @@
{{#refresh}}
<meta http-equiv="refresh" content="10">
{{/refresh}}
<title>Onion Monero Blockchain Explorer</title>
<title>Wownero Blockchain Explorer</title>
<!--<link rel="stylesheet" type="text/css" href="/css/style.css">-->
<style type="text/css">
{{#css_styles}}{{/css_styles}}
@ -19,7 +19,7 @@
<div>
<div class="center">
<h1 class="center"><a href="/">Onion Monero Blockchain Explorer</a></h1>
<h1 class="center"><a href="/">Wownero Blockchain Explorer</a></h1>
<h4 style="font-size: 15px; margin: 0px">({{^enable_js}}no javascript - {{/enable_js}}no cookies - no web analytics trackers - no images - open sourced)</h4>
</div>

View file

@ -55,7 +55,7 @@
{{#emission}}
<h3 style="font-size: 12px; margin-top: 2px">
Monero emission (fees) is {{amount}} ({{fee_amount}}) as of {{blk_no}} block
Wownero emission is {{amount}} ({{fee_amount}} fees) as of {{blk_no}} block
</h3>
{{/emission}}

View file

@ -1,16 +1,16 @@
var config = {
testnet: false, // this is adjusted page.h if needed. dont need to change manually
stagenet: false, // this is adjusted page.h if needed. dont need to change manually
coinUnitPlaces: 12,
txMinConfirms: 10, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero
coinUnitPlaces: 11,
txMinConfirms: 4, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero
txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero
coinSymbol: 'XMR',
openAliasPrefix: "xmr",
coinName: 'Monero',
coinUriPrefix: 'monero:',
addressPrefix: 18,
integratedAddressPrefix: 19,
subAddressPrefix: 42,
coinSymbol: 'WOW',
openAliasPrefix: "wow",
coinName: 'Wownero',
coinUriPrefix: 'wownero:',
addressPrefix: 4146,
integratedAddressPrefix: 6810,
subAddressPrefix: 12208,
addressPrefixTestnet: 53,
integratedAddressPrefixTestnet: 54,
subAddressPrefixTestnet: 63,
@ -20,11 +20,11 @@ var config = {
feePerKB: new JSBigInt('2000000000'),//20^10 - for testnet its not used, as fee is dynamic.
dustThreshold: new JSBigInt('1000000000'),//10^10 used for choosing outputs/change - we decompose all the way down if the receiver wants now regardless of threshold
txChargeRatio: 0.5,
defaultMixin: 4, // minimum mixin for hardfork v5
defaultMixin: 21, // minimum mixin for hardfork v9
txChargeAddress: '',
idleTimeout: 30,
idleWarningDuration: 20,
maxBlockNumber: 500000000,
avgBlockTime: 120,
avgBlockTime: 300,
debugMode: false
};

View file

@ -69,7 +69,7 @@
</table>
<h3>
Sum XMR from matched outputs (i.e., incoming XMR):
Sum WOW from matched outputs (i.e., incoming WOW):
{{#found_our_outputs}}
{{sum_xmr}}
{{/found_our_outputs}}
@ -142,7 +142,7 @@
</div>
<h3>
Sum XMR from matched and marked by * ring member's outputs: {{sum_mixin_xmr}}
Sum WOW from matched and marked by * ring member's outputs: {{sum_mixin_xmr}}
<br/>
<span style="font-size: 16px"> Possible spending is:
{{possible_spending}} (tx fee included)
@ -155,7 +155,7 @@
<br/>
<span style="font-size: 14px">
Number of possible our mixins is {{no_all_possible_mixins}}
for {{all_possible_mixins_amount}} xmr
for {{all_possible_mixins_amount}} wow
(amount as uint64).
</span>
</h3>

View file

@ -56,7 +56,7 @@
</table>
<h3>{{outputs_no}} output(s) for total of {{outputs_xmr_sum}} xmr</h3>
<h3>{{outputs_no}} output(s) for total of {{outputs_xmr_sum}} wow</h3>
<div class="center">
<table class="center">
<tr>
@ -82,7 +82,7 @@
<input type="radio" id="tab-1" name="tab-group-1" checked>
<label for="tab-1">Decode outputs</label>
<div class="content">
<h4 style="margin: 0px">Check which outputs belong to given Monero address/subaddress and viewkey</h4>
<h4 style="margin: 0px">Check which outputs belong to given Wownero address/subaddress and viewkey</h4>
<h5 style="margin: 0px">
For RingCT transactions, outputs' amounts are also decoded
<br/>
@ -95,7 +95,7 @@
</h5>
<form action="/myoutputs" method="post" style="width:100%; margin-top:2px" class="style-1">
<input type="hidden" name="tx_hash" value="{{tx_hash}}"><br/>
<input type="text" name="xmr_address" size="110" placeholder="Monero address/subaddress"><br/>
<input type="text" name="xmr_address" size="110" placeholder="Wownero address/subaddress"><br/>
<input type="text" name="viewkey" size="110" placeholder="Private viewkey" style="margin-top:5px"><br/>
<input type="hidden" name="raw_tx_data" value="{{raw_tx_data}}">
<!--above raw_tx_data field only used when checking raw tx data through tx pusher-->
@ -117,10 +117,10 @@
<label for="tab-2">Prove sending</label>
<div class="content">
<h4 style="margin: 0px">Prove to someone that you have sent them Monero in this transaction</h4>
<h4 style="margin: 0px">Prove to someone that you have sent them Wownero in this transaction</h4>
<h5 style="margin: 0px">
Tx private key can be obtained using <i>get_tx_key</i>
command in <i>monero-wallet-cli</i> command line tool
command in <i>wownero-wallet-cli</i> command line tool
<br/>
{{#enable_js}}
Note: address/subaddress and tx private key are NOT sent to the server, as the calculations are done on the client side
@ -134,7 +134,7 @@
<input type="text" name="txprvkey" size="120" placeholder="Tx private key"><br/>
<input type="hidden" name="raw_tx_data" value="{{raw_tx_data}}">
<!--above raw_tx_data field only used when checking raw tx data through tx pusher-->
<input type="text" name="xmraddress" size="120" placeholder="Recipient's monero address/subaddress" style="margin-top:5px"><br/>
<input type="text" name="xmraddress" size="120" placeholder="Recipient's wownero address/subaddress" style="margin-top:5px"><br/>
{{#enable_js}}
<!-- if have js, DONOT submit the form to server.
@ -345,7 +345,7 @@
decoding_results_str += "<tr>"
+"<td>" + output_idx + "</td>"
+"<td>" + output_pub_key + "</td>"
+"<td>" + (amount / 1e12) + "</td>"
+"<td>" + (amount / 1e11) + "</td>"
+"<td>" + mine_output_str + "</td>"
+"</tr>";
@ -356,7 +356,7 @@
decoding_results_str += "</table>";
decoding_results_str += "<h3>Sum XMR from matched outputs (i.e., incoming XMR): " + (sum_outptus / 1e12) + "</h3>"
decoding_results_str += "<h3>Sum WOW from matched outputs (i.e., incoming WOW): " + (sum_outptus / 1e12) + "</h3>"
// decrypt payment_id8 which results in using
@ -397,14 +397,14 @@
{{/enable_mixins_details}}
{{^inputs_xmr_sum_not_zero}}
<h3>{{inputs_no}} input(s) for total of {{inputs_xmr_sum}} xmr</h3>
<h3>{{inputs_no}} input(s) for total of {{inputs_xmr_sum}} wow</h3>
{{/inputs_xmr_sum_not_zero}}
{{#inputs_xmr_sum_not_zero}}
{{^have_any_unknown_amount}}
<h3>{{inputs_no}} inputs(s) for total of {{inputs_xmr_sum}} xmr</h3>
<h3>{{inputs_no}} inputs(s) for total of {{inputs_xmr_sum}} wow</h3>
{{/have_any_unknown_amount}}
{{#have_any_unknown_amount}}
<h3>{{inputs_no}} inputs(s) for total of at least {{inputs_xmr_sum}} xmr</h3>
<h3>{{inputs_no}} inputs(s) for total of at least {{inputs_xmr_sum}} wow</h3>
{{/have_any_unknown_amount}}
{{/inputs_xmr_sum_not_zero}}

View file

@ -9,12 +9,12 @@
<div class="center">
<form action="/checkandpush" method="post" style="width:100%; margin-top:15px" class="style-1">
Paste here either a hex string of raw transaction<br/>
(the <i>tx_blob</i> response in the wallet RPC, or the <i>raw_monero_tx</i>
(the <i>tx_blob</i> response in the wallet RPC, or the <i>raw_wownero_tx</i>
file saved by the wallet CLI with <i>--do-not-relay</i> option specified),<br/>
or base64 encoded, unsigned or signed transaction data<br/>
<br/>
(In Linux, can get the raw tx data: <i>cat raw_monero_tx | xclip -selection clipboard</i>)<br/>
(In Windows, can get the raw tx data: <i>certutil.exe -encode -f raw_monero_tx encoded.txt & type "encoded.txt" | clip</i>)<br/>
(In Linux, can get the raw tx data: <i>cat raw_wownero_tx | xclip -selection clipboard</i>)<br/>
(In Windows, can get the raw tx data: <i>certutil.exe -encode -f raw_wownero_tx encoded.txt & type "encoded.txt" | clip</i>)<br/>
<textarea name="rawtxdata" rows="20" cols="80"></textarea>
<br/>

View file

@ -8,7 +8,7 @@
#define PATH_SEPARARTOR '/'
#define XMR_AMOUNT(value) \
static_cast<double>(value) / 1e12
static_cast<double>(value) / 1e11
#define REMOVE_HASH_BRAKETS(a_hash) \
a_hash.substr(1, a_hash.size()-2)
@ -224,7 +224,7 @@ get_payment_id(const transaction& tx,
inline double
get_xmr(uint64_t core_amount)
{
return static_cast<double>(core_amount) / 1e12;
return static_cast<double>(core_amount) / 1e11;
}
array<size_t, 5>