mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Fix RPC/pruneblockchain returned prune height
Github-Pull: #15991
Rebased-From: 97f517dd85
This commit is contained in:
committed by
MarcoFalke
parent
b2398240ff
commit
c80a498ae5
@@ -1030,7 +1030,12 @@ static UniValue pruneblockchain(const JSONRPCRequest& request)
|
||||
}
|
||||
|
||||
PruneBlockFilesManual(height);
|
||||
return uint64_t(height);
|
||||
const CBlockIndex* block = ::chainActive.Tip();
|
||||
assert(block);
|
||||
while (block->pprev && (block->pprev->nStatus & BLOCK_HAVE_DATA)) {
|
||||
block = block->pprev;
|
||||
}
|
||||
return uint64_t(block->nHeight);
|
||||
}
|
||||
|
||||
static UniValue gettxoutsetinfo(const JSONRPCRequest& request)
|
||||
|
||||
Reference in New Issue
Block a user