Skip to content

Commit 08776e7

Browse files
Report per algorithm block height
1 parent 2ca756d commit 08776e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* tip, const CBlockIn
198198

199199
if (blockindex->IsProofOfStake()) {
200200
result.pushKV("proof", "stake");
201+
result.pushKV("algoheight", blockindex->nHeightPoS);
201202
result.pushKV("signature", HexStr(block.vchBlockSig));
202203

203204
UniValue stakeData(UniValue::VOBJ);
@@ -241,6 +242,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* tip, const CBlockIn
241242
result.pushKV("coinstake", stakeData);
242243
} else {
243244
result.pushKV("proof", "work");
245+
result.pushKV("algoheight", blockindex->nHeightPoW);
244246
result.pushKV("proofhash", block.GetPoWHash().GetHex());
245247
}
246248

0 commit comments

Comments
 (0)