mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Fix for kept block amount when cache already contains more.
This commit is contained in:
parent
d46ff35dfb
commit
ce582eefc6
@ -93,7 +93,7 @@ class Blocks {
|
||||
|
||||
this.blocks.push(block);
|
||||
if (this.blocks.length > Blocks.KEEP_BLOCK_AMOUNT) {
|
||||
this.blocks.shift();
|
||||
this.blocks = this.blocks.slice(-Blocks.KEEP_BLOCK_AMOUNT);
|
||||
}
|
||||
|
||||
if (this.newBlockCallbacks.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user