File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
__tests__/unit/core-blockchain
packages/core-blockchain/src Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ describe("Blockchain", () => {
58
58
logService . warning = jest . fn ( ) ;
59
59
logService . info = jest . fn ( ) ;
60
60
logService . error = jest . fn ( ) ;
61
+ logService . debug = jest . fn ( ) ;
61
62
62
63
stateStore . started = false ;
63
64
stateStore . clearWakeUpTimeout = jest . fn ( ) ;
Original file line number Diff line number Diff line change @@ -354,6 +354,13 @@ export class Blockchain implements Contracts.Blockchain.Blockchain {
354
354
* Process the given block.
355
355
*/
356
356
public async processBlocks ( blocks : Interfaces . IBlockData [ ] ) : Promise < Interfaces . IBlock [ ] | undefined > {
357
+ if ( blocks . length ) {
358
+ const lastHeight = this . getLastBlock ( ) . data . height ;
359
+ const fromHeight = blocks [ 0 ] . height ;
360
+ const toHeight = blocks [ blocks . length - 1 ] . height ;
361
+ this . app . log . debug ( `Processing chunk of blocks [${ fromHeight } , ${ toHeight } ] on top of ${ lastHeight } ` ) ;
362
+ }
363
+
357
364
const blockTimeLookup = await Utils . forgingInfoCalculator . getBlockTimeLookup ( this . app , blocks [ 0 ] . height ) ;
358
365
359
366
const acceptedBlocks : Interfaces . IBlock [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments