mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
Fix RPC/pruneblockchain returned prune height
This commit is contained in:
parent
8a503a6c6d
commit
97f517dd85
1 changed files with 6 additions and 1 deletions
|
@ -1061,7 +1061,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)
|
||||
|
|
Loading…
Reference in a new issue