aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorcslashm <cslashm@gmail.com>2018-04-09 16:07:11 +0200
committercslashm <cslashm@gmail.com>2018-04-09 16:53:13 +0200
commitd481410bff5c2a189d303ce81ec7e94cc470cc3d (patch)
tree055459bf1390d2d777c0bf6f288487301a649762 /src/wallet/wallet2.cpp
parentMerge pull request #3512 (diff)
downloadmonero-d481410bff5c2a189d303ce81ec7e94cc470cc3d.tar.xz
Fix sub-address tx scan.
When additional keys was needed, the TX scan failed because the derivation data was always recomputed with the main tx_key and not the corresponding additional one. Moreover this patch avoid perf decreasing when not using HW device.
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index b06444132..b5ae1b53e 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1181,7 +1181,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
THROW_WALLET_EXCEPTION_IF(tx_scan_info[i].error, error::acc_outs_lookup_error, tx, tx_pub_key, m_account.get_keys());
if (tx_scan_info[i].received)
{
- hwdev.generate_key_derivation(tx_pub_key, keys.m_view_secret_key, tx_scan_info[i].received->derivation);
+ hwdev.conceal_derivation(tx_scan_info[i].received->derivation, tx_pub_key, additional_tx_pub_keys, derivation, additional_derivations);
scan_output(tx, tx_pub_key, i, tx_scan_info[i], num_vouts_received, tx_money_got_in_outs, outs);
}
}
@@ -1204,7 +1204,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
THROW_WALLET_EXCEPTION_IF(tx_scan_info[i].error, error::acc_outs_lookup_error, tx, tx_pub_key, m_account.get_keys());
if (tx_scan_info[i].received)
{
- hwdev.generate_key_derivation(tx_pub_key, keys.m_view_secret_key, tx_scan_info[i].received->derivation);
+ hwdev.conceal_derivation(tx_scan_info[i].received->derivation, tx_pub_key, additional_tx_pub_keys, derivation, additional_derivations);
scan_output(tx, tx_pub_key, i, tx_scan_info[i], num_vouts_received, tx_money_got_in_outs, outs);
}
}
@@ -1220,7 +1220,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
{
hwdev_lock.lock();
hwdev.set_mode(hw::device::NONE);
- hwdev.generate_key_derivation(tx_pub_key, keys.m_view_secret_key, tx_scan_info[i].received->derivation);
+ hwdev.conceal_derivation(tx_scan_info[i].received->derivation, tx_pub_key, additional_tx_pub_keys, derivation, additional_derivations);
scan_output(tx, tx_pub_key, i, tx_scan_info[i], num_vouts_received, tx_money_got_in_outs, outs);
hwdev_lock.unlock();
}