monitors/monitor.js
/**
   * Indicate that a value should be less than a certain amount.
   *
   * NOTE: This method is only available for numeric types.
   */
Indicate that a value should be less than a certain amount.
NOTE: This method is only available for numeric types.
Indicate that a value should be less than a certain amount . NOTE : This method is only available for numeric types .
async expectLessThan(value, message) {
    value = asBN(value);
    if (!value) {
      throw new Error(`lte-assert: unsupported type - ${typeof value} `);
    }
    const actualValue = await this.fetchValue();
    if (!this.lte(actualValue, value)) {
      assert.fail(`${this.toString()}: Error validating state (expected<=${value}, actual=${actualValue}) ${this.errorMsg || ""}`);
    }
    console.log(`${this.toString()}: validated change (${this.lastValue}) => (${actualValue})`)
    await this.reset(actualValue);
  }
async expectLessThan ( value , message ) { value = asBN ( value ) ; if ( ! value ) { throw new Error ( ` ${ typeof value } ` ) ; } const actualValue = await this . fetchValue ( ) ; if ( ! this . lte ( actualValue , value ) ) { assert . fail ( ` ${ this . toString ( ) } ${ value } ${ actualValue } ${ this . errorMsg || "" } ` ) ; } console . log ( ` ${ this . toString ( ) } ${ this . lastValue } ${ actualValue } ` ) await this . reset ( actualValue ) ; }
Indicate that a value should be less than a certain amount.
Indicate that a value should be less than a certain amount .