aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/mining.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-08-15 13:54:36 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-08-15 14:09:35 -0400
commitfa6ab8ada14dd265e224496440ab0b5d99dfd0ef (patch)
treec4403a84e4fae58c4f66af2db93e82ed019db7d3 /src/rpc/mining.cpp
parentb5591ca0b053623f0d96423b05ad809115a0bdef (diff)
rpc: Return more specific reject reason for submitblock
Diffstat (limited to 'src/rpc/mining.cpp')
-rw-r--r--src/rpc/mining.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 623b0bd86a..8365f5ed42 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -750,11 +750,7 @@ static UniValue submitblock(const JSONRPCRequest& request)
RegisterValidationInterface(&sc);
bool accepted = ProcessNewBlock(Params(), blockptr, /* fForceProcessing */ true, /* fNewBlock */ &new_block);
UnregisterValidationInterface(&sc);
- if (!new_block) {
- if (!accepted) {
- // TODO Maybe pass down fNewBlock to AcceptBlockHeader, so it is properly set to true in this case?
- return "invalid";
- }
+ if (!new_block && accepted) {
return "duplicate";
}
if (!sc.found) {