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

View File

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