File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,15 @@ export interface TransactionResponse extends Transaction {
5656
5757export type BlockTag = string | number ;
5858
59- interface _Block {
59+ export interface _Block {
6060 hash : string ;
6161 parentHash : string ;
6262 number : number ;
6363
6464 timestamp : number ;
6565 nonce : string ;
6666 difficulty : number ;
67+ _difficulty : BigNumber ;
6768
6869 gasLimit : BigNumber ;
6970 gasUsed : BigNumber ;
Original file line number Diff line number Diff line change @@ -295,7 +295,11 @@ export class Formatter {
295295 if ( value . author != null && value . miner == null ) {
296296 value . miner = value . author ;
297297 }
298- return Formatter . check ( format , value ) ;
298+ // The difficulty may need to come from _difficulty in recursed blocks
299+ const difficulty = ( value . _difficulty != null ) ? value . _difficulty : value . difficulty ;
300+ const result = Formatter . check ( format , value ) ;
301+ result . _difficulty = ( ( difficulty == null ) ? null : BigNumber . from ( difficulty ) ) ;
302+ return result ;
299303 }
300304
301305 block ( value : any ) : Block {
You can’t perform that action at this time.
0 commit comments