Test
This commit is contained in:
@@ -107,6 +107,11 @@ static UniValue ValuePoolDesc(
|
|||||||
UniValue blockheaderToJSON(const CBlockIndex* blockindex)
|
UniValue blockheaderToJSON(const CBlockIndex* blockindex)
|
||||||
{
|
{
|
||||||
UniValue result(UniValue::VOBJ);
|
UniValue result(UniValue::VOBJ);
|
||||||
|
if ( blockindex == 0 )
|
||||||
|
{
|
||||||
|
result.push_back(Pair("error", "null blockhash"));
|
||||||
|
return(result);
|
||||||
|
}
|
||||||
result.push_back(Pair("hash", blockindex->GetBlockHash().GetHex()));
|
result.push_back(Pair("hash", blockindex->GetBlockHash().GetHex()));
|
||||||
int confirmations = -1;
|
int confirmations = -1;
|
||||||
// Only report confirmations if the block is on the main chain
|
// Only report confirmations if the block is on the main chain
|
||||||
|
|||||||
Reference in New Issue
Block a user