allow scanning of no-relay txs in mempool

pull/5/head
moneroexamples 7 years ago
parent 30b3756156
commit 8ff987eb49

@ -1,6 +1,6 @@
var config = {
apiUrl: "http://127.0.0.1:1984/",
testnet: true,
testnet: false,
coinUnitPlaces: 12,
txMinConfirms: 10, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero
txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero
@ -15,7 +15,7 @@ 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,
defaultMixin: 4, // minimum mixin for hardfork v5
txChargeAddress: '',
idleTimeout: 30,
idleWarningDuration: 20,

@ -24,6 +24,7 @@
<div class="move-text-div">
<div class="review-text">{{spend_key}} </div>
</div>
<!--
<label class="field-label review" for="Mnemonic-2">Importing to <i>monero-wallet-cli</i> using the seed</label>
<div class="move-text-div">
<div class="review-text">
@ -38,6 +39,7 @@
<br/> note: <i>monero-wallet-cli</i> in Windows is <i>monero-wallet-cli.exe</i>
</div>
</div>
-->
<div class="submit-div">
<a class="login-btn modals pointer" data-ix="close-review-details" hide-modal>Ok, thanks!</a>
</div>

@ -49,7 +49,7 @@
</div>
</div>
</div>
<div class="received-div" ng-repeat="tx in transactions | limitTo:5">
<div class="received-div" ng-repeat="tx in transactions | limitTo:10">
<div class="w-row" ng-click="toggle_tx_detail(tx)">
<div class="w-col w-col-2 responsive-column">

@ -64,6 +64,7 @@ if (testnet && deamon_url == "http:://127.0.0.1:18081")
cout << "Blockchain path: " << blockchain_path.string() << endl;
// setup mysql/mariadb connectio details
xmreg::MySqlConnector::url = "127.0.0.1";
xmreg::MySqlConnector::username = "root";
xmreg::MySqlConnector::password = "root";
@ -94,14 +95,14 @@ if (!xmreg::CurrentBlockchainStatus::init_monero_blockchain())
// launch the status monitoring thread so that it keeps track of blockchain
// info, e.g., current height. Information from this thread is used
// by tx searching threads that are launch for each user independent,
// when they login back or create new account.
// by tx searching threads that are launched for each user independently,
// when they log back or create new account.
xmreg::CurrentBlockchainStatus::start_monitor_blockchain_thread();
// create REST JSON API services
xmreg::YourMoneroRequests::show_logs = true;
xmreg::YourMoneroRequests your_xmr(
@ -136,6 +137,10 @@ auto import_wallet_request = your_xmr.make_resource(
&xmreg::YourMoneroRequests::import_wallet_request,
"/import_wallet_request");
auto settings = make_shared<Settings>( );
if (use_ssl)

@ -428,11 +428,6 @@ CurrentBlockchainStatus::read_mempool()
// get transaction info of the tx in the mempool
tx_info _tx_info = mempool_tx_info.at(i);
if (_tx_info.do_not_relay == true)
{
continue;
}
crypto::hash mem_tx_hash = null_hash;
if (hex_to_pod(_tx_info.id_hash, mem_tx_hash))

@ -195,6 +195,9 @@ OutputInputIdentification::identify_inputs(
// mixin counter
size_t count = 0;
// indicates whether we found any matching mixin in the current input
bool found_a_match {false};
// for each found output public key check if its ours or not
for (const uint64_t& abs_offset: absolute_offsets)
{
@ -233,10 +236,23 @@ OutputInputIdentification::identify_inputs(
(*it).second, // amount
output_public_key_str});
count++;
found_a_match = true;
++count;
} // for (const cryptonote::output_data_t& output_data: outputs)
if (found_a_match == false)
{
// if we didnt find any match, break of the look.
// there is no reason to check remaining key images
// as when we spent something, our outputs should be
// in all inputs in a given txs. Thus, if a single input
// is without our output, we can assume this tx does
// not contain any of our spendings.
break;
}
} // for (const txin_to_key& in_key: input_key_imgs)
}

@ -43,6 +43,8 @@ TxSearch::TxSearch(XmrAccount& _acc)
// this accont
searched_blk_no = acc->scanned_block_height;
last_ping_timestamp = 0;
ping();
}

@ -267,8 +267,8 @@ YourMoneroRequests::get_address_txs(const shared_ptr< Session > session, const B
for (json& j_tx: j_mempool_tx)
{
//cout << "mempool j_tx[\"total_received\"]: "
// << j_tx["total_received"] << endl;
cout << "mempool j_tx[\"total_received\"]: "
<< j_tx["total_received"] << endl;
j_tx["id"] = ++last_tx_id_db;

Loading…
Cancel
Save