mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 06:47:52 +01:00
Fix error 500 when querying /blocks using "INDEXING_BLOCKS_AMOUNT": 0
This commit is contained in:
parent
f18ea6a7a3
commit
db4bf52596
1 changed files with 1 additions and 1 deletions
|
@ -677,7 +677,7 @@ class Blocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async $getBlocks(fromHeight?: number, limit: number = 15): Promise<BlockExtended[]> {
|
public async $getBlocks(fromHeight?: number, limit: number = 15): Promise<BlockExtended[]> {
|
||||||
let currentHeight = fromHeight !== undefined ? fromHeight : await blocksRepository.$mostRecentBlockHeight();
|
let currentHeight = fromHeight !== undefined ? fromHeight : this.currentBlockHeight;
|
||||||
const returnBlocks: BlockExtended[] = [];
|
const returnBlocks: BlockExtended[] = [];
|
||||||
|
|
||||||
if (currentHeight < 0) {
|
if (currentHeight < 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue