Merge pull request #7740

8cea9d8 wallet: Reset RPC Pay ID on node switch (tobtoht)
This commit is contained in:
luigi1111 2021-07-27 16:55:14 -04:00
commit 2d5b8a6ff7
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
1 changed files with 3 additions and 0 deletions

View File

@ -1320,6 +1320,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();