diff options
| author | Gavin Andresen <[email protected]> | 2013-01-29 19:37:44 -0800 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-01-29 19:37:44 -0800 |
| commit | db3b4ade7ba8a91afaa649177d5f297f20eb40fd (patch) | |
| tree | 9a03e88480630844c8732379b2b7286313b1b901 /src/rpcmining.cpp | |
| parent | Merge branch 'master' of github.com:bitcoin/bitcoin (diff) | |
| parent | Deal with LevelDB errors (diff) | |
| download | discoin-db3b4ade7ba8a91afaa649177d5f297f20eb40fd.tar.xz discoin-db3b4ade7ba8a91afaa649177d5f297f20eb40fd.zip | |
Merge pull request #2224 from sipa/valstate
Improve error handling during validation
Diffstat (limited to 'src/rpcmining.cpp')
| -rw-r--r-- | src/rpcmining.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 778e0acbd..b9ebcb400 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -365,9 +365,10 @@ Value submitblock(const Array& params, bool fHelp) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed"); } - bool fAccepted = ProcessBlock(NULL, &pblock); + CValidationState state; + bool fAccepted = ProcessBlock(state, NULL, &pblock); if (!fAccepted) - return "rejected"; + return "rejected"; // TODO: report validation state return Value::null; } |