commit method Null safety

void commit(
  1. Uint8List id,
  2. BlockModel block,
  3. Uint8List proof
)

Commits the transaction by saving its TransactionModel.merkelProof and TransactionModel.block

Implementation

void commit(Uint8List id, BlockModel block, Uint8List proof) =>
    _db.execute('''
  UPDATE $table
  SET $columnMerkelProof = x'${Bytes.hexEncode(proof)}',
  $columnBlockId =  x'${Bytes.hexEncode(block.id!)}'
  WHERE $columnId = x'${Bytes.hexEncode(id)}'; ''');