submit method

bool submit(
  1. Uint8List block, [
  2. Uint8List? justification
])

Verifies justification and applies block atomically.

Implementation

bool submit(Uint8List block, [Uint8List? justification]) {
  final j = justification ?? Uint8List(0);
  return _scoped(
    [block, j],
    (p) =>
        _bc.lib
            .fn<_ChainSubmitC>('aviary_chain_submit')
            .asFunction<_ChainSubmitD>()(
          _h,
          p[0],
          block.length,
          p[1],
          j.length,
        ) ==
        1,
  );
}