setTransactions method

void setTransactions(
  1. List<Uint8List> encodedTxs
)

The encoded transactions this node includes when it proposes at the current height; cleared when it commits, so set the next height's list before advance. Throws on a malformed transaction.

Implementation

void setTransactions(List<Uint8List> encodedTxs) {
  final blob = _blobList(encodedTxs);
  final ok = _scoped(
    [blob],
    (p) => _bc.lib
        .fn<_HandleBytesIntC>('aviary_net_node_set_transactions')
        .asFunction<_HandleBytesIntD>()(_h, p[0], blob.length),
  );
  if (ok != 1) {
    throw const AviaryException(
      'malformed transaction',
      AviaryStatus.badInput,
    );
  }
}