aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-22 18:10:52 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-22 18:12:29 +0000
commit81c2658989a303b678d688e33954e7e565981c58 (patch)
tree6669576e65035f93cf3b564e474dfc3e17b5939c /src
parentMerge pull request #6097 (diff)
downloadmonero-81c2658989a303b678d688e33954e7e565981c58.tar.xz
rpc: don't auto fail RPC needing payment in bootstrap mode
Diffstat (limited to 'src')
-rw-r--r--src/rpc/core_rpc_server.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 9117b5b3a..cb526233a 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1958,7 +1958,11 @@ namespace cryptonote
m_was_bootstrap_ever_used = true;
}
- r = r && res.status == CORE_RPC_STATUS_OK;
+ if (r && res.status != CORE_RPC_STATUS_PAYMENT_REQUIRED && res.status != CORE_RPC_STATUS_OK)
+ {
+ MINFO("Failing RPC " << command_name << " due to peer return status " << res.status);
+ r = false;
+ }
res.untrusted = true;
return true;
}