diff options
| author | MarcoFalke <[email protected]> | 2018-08-15 13:54:36 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-08-15 14:09:35 -0400 |
| commit | fa6ab8ada14dd265e224496440ab0b5d99dfd0ef (patch) | |
| tree | c4403a84e4fae58c4f66af2db93e82ed019db7d3 /src/rpc/mining.cpp | |
| parent | Merge #13399: rpc: Add submitheader (diff) | |
| download | discoin-fa6ab8ada14dd265e224496440ab0b5d99dfd0ef.tar.xz discoin-fa6ab8ada14dd265e224496440ab0b5d99dfd0ef.zip | |
rpc: Return more specific reject reason for submitblock
Diffstat (limited to 'src/rpc/mining.cpp')
| -rw-r--r-- | src/rpc/mining.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 623b0bd86..8365f5ed4 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) { |