completeMaturingTransactions method

Future<void> completeMaturingTransactions (
  1. int height
)

When a Transaction matures move the Transaction.amount from maturesBalance to balance.

Implementation

Future<void> completeMaturingTransactions(int height) async {
  if (!opened) return;
  while (maturing.length > 0 && maturing.first.maturity <= height) {
    Transaction transaction = maturing.removeFirst();
    Address to = addresses[transaction.to.toJson()];
    _applyMaturesBalanceDelta(to, -transaction.amount);
    await _updateBalance(to, transaction.amount);
  }
}