adding subaddresses started

add_subaddress
moneroexamples 5 years ago
parent 405062c10a
commit a684cc71d5

@ -1,6 +1,5 @@
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/",
testnetExplorerUrl: "https://testnet.xmrchain.com/",
stagenetExplorerUrl: "http://139.162.60.17:8082/",

@ -6,7 +6,7 @@
#include "TxSearch.h"
#include "db/MySqlAccounts.h"
//#include "db/MySqlAccounts.h"
#include "db/ssqlses.h"
@ -77,6 +77,13 @@ searching_is_ongoing = true;
MicroCoreAdapter mcore_addapter {current_bc_status_ptr};
// make instance of Account from xmregcore. We need this to be
// able to identify outputs addressed to subaddresses based
// on the primary address
auto xmregcore_account = xmreg::make_account(
acc->address, acc->viewkey);
// we put everything in massive catch, as there are plenty ways in which
// an exceptions can be thrown here. Mostly from mysql.
// but because this is detatch thread, we cant catch them in main thread.
@ -201,9 +208,14 @@ for (auto const& tx_tuple: txs_data)
// Class that is responsible for identification of our outputs
// 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,
make_unique<Output>(&address, &viewkey),
make_unique<Input>(&address, &viewkey,
make_unique<Output>(xmregcore_account.get()),
make_unique<Input>(xmregcore_account.get(),
&known_outputs_keys,
&mcore_addapter));
identifier.identify();

@ -71,6 +71,7 @@ private:
// represents a row in mysql's Accounts table
shared_ptr<XmrAccount> acc;
// stores known output public keys.
// used as a cash to fast look up of
// our public keys in key images. Saves a lot of

Loading…
Cancel
Save