File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import { U64 } from "codechain-primitives";
1818
1919export const $else = Symbol ( "else" ) ;
2020
21- interface Predicate {
21+ export interface Predicate {
2222 ( _ : any ) : boolean ;
2323 toString ( ) : string ;
2424}
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ import CodeChain from "../helper/spawn";
128128 console . log ( "Txes prepared" ) ;
129129
130130 for ( let k = 0 ; k < 4 ; k ++ ) {
131-
131+
132132 let i = numTransactions - 1 ;
133133 while ( i > 0 ) {
134134 console . log ( `${ i } ` ) ;
@@ -168,7 +168,7 @@ import CodeChain from "../helper/spawn";
168168 console . log ( "---------------------" ) ;
169169 console . log ( `Block ${ lastNum } ` ) ;
170170 const block = await nodes [ 0 ] . sdk . rpc . chain . getBlock ( lastNum ) ;
171- const txnum = block ? .transactions . length ! ;
171+ const txnum = block ! . transactions . length ! ;
172172 consumed += txnum ;
173173 console . log ( `Txs: ${ txnum } ` ) ;
174174
@@ -205,7 +205,11 @@ import CodeChain from "../helper/spawn";
205205
206206 for ( let i = 0 ; i <= bnEnd ; i ++ ) {
207207 const block = await nodes [ 0 ] . sdk . rpc . chain . getBlock ( i ) ;
208- console . log ( `BLOCK${ i } : ${ block ?. transactions . length } ` ) ;
208+ if ( block != null ) {
209+ console . log ( `BLOCK${ i } : ${ block . transactions . length } ` ) ;
210+ } else {
211+ console . log ( `BLOCK${ i } : null` ) ;
212+ }
209213 }
210214
211215 console . log ( `TPS: ${ tps } ` ) ;
You can’t perform that action at this time.
0 commit comments