Compare commits

...

3 Commits

Author SHA1 Message Date
moneroexamples 8bf2730fdc subaddresses added to mempool scanning
5 years ago
moneroexamples 9b1fa0db78 allow multiple importsfor 0 fee
5 years ago
moneroexamples a684cc71d5 adding subaddresses started
5 years ago

@ -1,6 +1,5 @@
var config = { var config = {
apiUrl: "http://0.0.0.0:1984/", apiUrl: "http://127.0.0.1:1984/",
//apiUrl: "http://127.0.0.1:1984/",
mainnetExplorerUrl: "https://xmrchain.com/", mainnetExplorerUrl: "https://xmrchain.com/",
testnetExplorerUrl: "https://testnet.xmrchain.com/", testnetExplorerUrl: "https://testnet.xmrchain.com/",
stagenetExplorerUrl: "http://139.162.60.17:8082/", stagenetExplorerUrl: "http://139.162.60.17:8082/",

@ -38,10 +38,10 @@ thinwalletCtrls.controller("ImportWalletCtrl", function($scope, $location, $http
$scope.success = ''; $scope.success = '';
function get_import_request() { function get_import_request() {
if ($scope.account_scan_start_height === 0) { // if ($scope.account_scan_start_height === 0) {
ModalService.hide('import-wallet'); // ModalService.hide('import-wallet');
return; // return;
} // }
ApiCalls.import_wallet_request(AccountService.getAddress(), AccountService.getViewKey()) ApiCalls.import_wallet_request(AccountService.getAddress(), AccountService.getViewKey())
.then(function(response) { .then(function(response) {

@ -6,12 +6,12 @@
#include "TxSearch.h" #include "TxSearch.h"
#include "db/MySqlAccounts.h" //#include "db/MySqlAccounts.h"
#include "db/ssqlses.h" #include "db/ssqlses.h"
#include "CurrentBlockchainStatus.h" #include "CurrentBlockchainStatus.h"
#include "src/UniversalIdentifier.hpp"
namespace xmreg namespace xmreg
{ {
@ -44,6 +44,18 @@ TxSearch::TxSearch(XmrAccount const& _acc,
+ acc->viewkey); + acc->viewkey);
} }
// make instance of Account from xmregcore. We need this to be
// able to identify outputs addressed to subaddresses based
// on the primary address
xmregcore_account = xmreg::make_account(
acc->address, acc->viewkey);
if (!xmregcore_account)
{
throw TxSearchException("Cant create xmregcore_account: "
+ acc->address);
}
populate_known_outputs(); populate_known_outputs();
// start searching from last block that we searched for // start searching from last block that we searched for
@ -201,9 +213,14 @@ for (auto const& tx_tuple: txs_data)
// Class that is responsible for identification of our outputs // Class that is responsible for identification of our outputs
// and inputs in a given tx. // and inputs in a given tx.
//auto identifier = make_identifier(tx,
//make_unique<Output>(&address, &viewkey),
//make_unique<Input>(&address, &viewkey,
//&known_outputs_keys,
//&mcore_addapter));
auto identifier = make_identifier(tx, auto identifier = make_identifier(tx,
make_unique<Output>(&address, &viewkey), make_unique<Output>(xmregcore_account.get()),
make_unique<Input>(&address, &viewkey, make_unique<Input>(xmregcore_account.get(),
&known_outputs_keys, &known_outputs_keys,
&mcore_addapter)); &mcore_addapter));
identifier.identify(); identifier.identify();
@ -235,6 +252,12 @@ for (auto const& tx_tuple: txs_data)
auto const& outputs_identified auto const& outputs_identified
= identifier.get<Output>()->get(); = identifier.get<Output>()->get();
if (!outputs_identified.empty())
{
cout << "outputs_identified.size(): "
<< outputs_identified.size() << '\n';
}
auto total_received = calc_total_xmr(outputs_identified); auto total_received = calc_total_xmr(outputs_identified);
vector<uint64_t> amount_specific_indices; vector<uint64_t> amount_specific_indices;
@ -771,8 +794,8 @@ uint8_t rct_type = (is_rct ? tx.rct_signatures.type : 0);
// and inputs in a given tx. // and inputs in a given tx.
auto identifier = make_identifier(tx, auto identifier = make_identifier(tx,
make_unique<Output>(&address, &viewkey), make_unique<Output>(xmregcore_account.get()),
make_unique<Input>(&address, &viewkey, make_unique<Input>(xmregcore_account.get(),
&known_outputs_keys, &known_outputs_keys,
&mcore_addapter)); &mcore_addapter));

@ -1,6 +1,7 @@
#pragma once #pragma once
#include "db/MySqlAccounts.h" #include "db/MySqlAccounts.h"
#include "src/UniversalIdentifier.hpp"
#include <memory> #include <memory>
#include <mutex> #include <mutex>
@ -71,6 +72,8 @@ private:
// represents a row in mysql's Accounts table // represents a row in mysql's Accounts table
shared_ptr<XmrAccount> acc; shared_ptr<XmrAccount> acc;
unique_ptr<xmreg::Account> xmregcore_account;
// stores known output public keys. // stores known output public keys.
// used as a cash to fast look up of // used as a cash to fast look up of
// our public keys in key images. Saves a lot of // our public keys in key images. Saves a lot of

@ -1 +1 @@
Subproject commit 447ac6fe53057a85f5468da030af24aacaa3fa61 Subproject commit 4356c9892b9903da4410f773ea36a6e4c799be5a
Loading…
Cancel
Save