aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-09-14 13:16:45 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-09-14 13:16:45 -0500
commit85962ee8e21c145d67dd249c5df250be8b3ab75d (patch)
tree55a664f887f1647461d26c8b0bf390b0a6f9f9b6 /src/rpc/core_rpc_server.cpp
parentMerge pull request #5871 (diff)
parentrpc: don't include an address in mining_status when not mining (diff)
downloadmonero-85962ee8e21c145d67dd249c5df250be8b3ab75d.tar.xz
Merge pull request #5872
495a7e5 rpc: don't include an address in mining_status when not mining (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 7706d2cf7..529cdbf2d 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1050,7 +1050,8 @@ namespace cryptonote
res.block_reward = lMiner.get_block_reward();
}
const account_public_address& lMiningAdr = lMiner.get_mining_address();
- res.address = get_account_address_as_str(nettype(), false, lMiningAdr);
+ if (lMiner.is_mining() || lMiner.get_is_background_mining_enabled())
+ res.address = get_account_address_as_str(nettype(), false, lMiningAdr);
const uint8_t major_version = m_core.get_blockchain_storage().get_current_hard_fork_version();
const unsigned variant = major_version >= 7 ? major_version - 6 : 0;
switch (variant)