Skip to content

Commit

Permalink
Adjust size check
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar committed Oct 24, 2019
1 parent d6d0467 commit b63eec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ UniValue getwork(const UniValue& params, bool fHelp)
// Parse parameters
std::vector<unsigned char> vchData = ParseHex(params[0].get_str());

if (vchData.size() != 80)
if (vchData.size() < 80)
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter");

CBlock* pdata = (CBlock*) &vchData[0];
Expand Down

0 comments on commit b63eec3

Please sign in to comment.