mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-08-26 06:21:55 +00:00
Fixed auxpow parsing.
This commit is contained in:
parent
1aa390ff47
commit
138bcf7855
@ -643,8 +643,14 @@ UniValue submitblock(const JSONRPCRequest& request)
|
|||||||
if (request.params[1].getType() != UniValue::VSTR) {
|
if (request.params[1].getType() != UniValue::VSTR) {
|
||||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "auxpow must be string type");
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "auxpow must be string type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cryptonote::blobdata auxblob;
|
||||||
|
if(!epee::string_tools::parse_hexstr_to_binbuff(request.params[1].get_str(), auxblob)) {
|
||||||
|
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Wrong block blob");
|
||||||
|
}
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << request.params[1].get_str();
|
ss << auxblob;
|
||||||
// load
|
// load
|
||||||
binary_archive<false> ba(ss);
|
binary_archive<false> ba(ss);
|
||||||
auxPow = std::shared_ptr<CAuxPow>(new CAuxPow());
|
auxPow = std::shared_ptr<CAuxPow>(new CAuxPow());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user