CValidationState framework

This commit is contained in:
Pieter Wuille
2013-01-27 00:14:11 +01:00
committed by Pieter Wuille
parent 2835080e16
commit ef3988ca36
8 changed files with 226 additions and 213 deletions

View File

@@ -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;
}