This commit is contained in:
blackjok3r
2018-10-25 16:44:01 +08:00
parent 8cec48894b
commit 2b21b2e94d

View File

@@ -435,6 +435,13 @@ UniValue getdatafromblock(const UniValue& params, bool fHelp)
} }
} }
} }
} else {
failed = 1;
}
if ( failed == 1 || skippedtxs == i ) {
result.push_back(Pair("error","there is no data in this block."));
} else {
std::string decodedstreamid; std::string decodedstreamid;
hex2ascii(streamid, decodedstreamid); hex2ascii(streamid, decodedstreamid);
result.push_back(Pair("streamid", decodedstreamid.c_str())); result.push_back(Pair("streamid", decodedstreamid.c_str()));
@@ -444,12 +451,6 @@ UniValue getdatafromblock(const UniValue& params, bool fHelp)
if (fVerbose == true) { if (fVerbose == true) {
result.push_back(Pair("data", blockdata)); result.push_back(Pair("data", blockdata));
} }
} else {
failed = 1;
}
if ( failed == 1 || skippedtxs == i ) {
result.push_back(Pair("error","there is no data in this block."));
} }
return result; return result;
} }