monitors/state.js
/**
   * Accept on-chain values for every one of our tracked monitors.
   */
Accept on-chain values for every one of our tracked monitors.
Accept on - chain values for every one of our tracked monitors .
async reset() {
    for (let group of this.all) {
      const keys = Object.keys(group);
      const results = await Promise.all([
        ...keys.map(srcKey => group[srcKey].reset().catch(e => e))
      ]);
      for (let i = 0; i < results.length; i++) {
        const res = results[i];
        if (res instanceof Error) {
          const exc = res;
          const monitor = group[keys[i]];
          throw new Error(`Failed to check value of ${monitor.type()}.${keys[i]}: ${exc.stack}`)
        }
      }
    }
    this.exceptions = [];
  }
async reset ( ) { for ( let group of this . all ) { const keys = Object . keys ( group ) ; const results = await Promise . all ( [ ... keys . map ( srcKey => group [ srcKey ] . reset ( ) . catch ( e => e ) ) ] ) ; for ( let i = 0 ; i < results . length ; i ++ ) { const res = results [ i ] ; if ( res instanceof Error ) { const exc = res ; const monitor = group [ keys [ i ] ] ; throw new Error ( ` ${ monitor . type ( ) } ${ keys [ i ] } ${ exc . stack } ` ) } } } this . exceptions = [ ] ; }
Accept on-chain values for every one of our tracked monitors.
Accept on - chain values for every one of our tracked monitors .