setTimeoutHeight method

void setTimeoutHeight(
  1. int? timeout
)

Sets the given timeout to be the number of blocks in which to execute the transaction.

Implementation

void setTimeoutHeight(int? timeout) {
  // Do not include default values as per ADR-027
  if (timeout == null || timeout == 0) {
    return;
  }

  // Create body if non existing
  if (!_stdTx.hasBody()) {
    _stdTx.body = TxBody.create();
  }

  // Set the timeout height
  _stdTx.body.timeoutHeight = fixnum.Int64(timeout);
}