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
pull/470/head
tobtoht 3 years ago
parent 0b6bfb1fd8
commit 8cea9d8605
Signed by untrusted user: tobtoht
GPG Key ID: 1CADD27F41F45C3C

@ -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();

Loading…
Cancel
Save