Fix for kept block amount when cache already contains more.

This commit is contained in:
softsimon 2020-11-02 21:28:40 +07:00
parent d46ff35dfb
commit ce582eefc6
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -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) {