File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default class MulticallSpy {
3030
3131 public multicallRequestSpy : Required < HttpTransportConfig > [ "onFetchRequest" ] =
3232 async request => {
33- if ( ! this . config . debugScanner ) {
33+ if ( ! this . config . debugScanner || this . config . optimistic ) {
3434 return ;
3535 }
3636 const data = ( await request . json ( ) ) as EIP1193Parameters < PublicRpcSchema > ;
@@ -45,21 +45,20 @@ export default class MulticallSpy {
4545
4646 public multicallResponseSpy : Required < HttpTransportConfig > [ "onFetchResponse" ] =
4747 async response => {
48- // if (!this.config.debugScanner) {
49- // return;
50- // }
48+ if ( ! this . config . debugScanner || this . config . optimistic ) {
49+ return ;
50+ }
5151 const copy = response . clone ( ) ;
5252 const resp = await copy . json ( ) ;
5353 const id = ( resp as any ) . id as number ;
5454 const call = this . #detectedCalls. find ( c => "id" in c && c . id === id ) ;
5555 if ( call ) {
5656 call . headers = Object . fromEntries ( response . headers . entries ( ) ) ;
5757 }
58- console . log ( { call } ) ;
5958 } ;
6059
6160 public async dumpCalls ( ) : Promise < void > {
62- if ( ! this . config . debugScanner ) {
61+ if ( ! this . config . debugScanner || this . config . optimistic ) {
6362 return ;
6463 }
6564 if ( ! this . config . outS3Bucket ) {
Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ class ScannerDiagnoster {
422422 blockNumber ?: bigint ,
423423 ) : Promise < CreditAccountData [ ] > {
424424 try {
425- if ( ! accounts . length || ! blockNumber ) {
425+ if ( ! accounts . length || ! blockNumber || this . config . optimistic ) {
426426 return accounts ;
427427 }
428428 const numZeroHF = accounts . filter ( a => a . healthFactor === 0n ) . length ;
You can’t perform that action at this time.
0 commit comments