diff options
author | tobtoht <thotbot@protonmail.com> | 2021-06-04 13:58:09 +0200 |
---|---|---|
committer | tobtoht <thotbot@protonmail.com> | 2021-06-04 13:58:09 +0200 |
commit | 8cea9d860521a6ca1a6af604ecc5bcd977a22040 (patch) | |
tree | e162fe23904ee3cbc9d99f0e4dd259f8f434e81e /src/wallet/wallet2.cpp | |
parent | Merge pull request #7399 (diff) | |
download | monero-8cea9d860521a6ca1a6af604ecc5bcd977a22040.tar.xz |
wallet: Reset RPC Pay ID on node switch
RPC pay client ID is sent with each RPC request, set a new secret every time we switch nodes to mitigate trivial correlation
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index e298eca53..1c4671150 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1319,6 +1319,9 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u m_trusted_daemon = trusted_daemon; if (changed) { + if (!m_persistent_rpc_client_id) { + set_rpc_client_secret_key(rct::rct2sk(rct::skGen())); + } m_rpc_payment_state.expected_spent = 0; m_rpc_payment_state.discrepancy = 0; m_node_rpc_proxy.invalidate(); |