Beispiel #1
0
 public virtual void Commit()
 {
     UnspentCoins.DeleteWhere((k, v) => v.Items.All(p => p.HasFlag(CoinState.Spent)));
     Blocks.Commit();
     Transactions.Commit();
     UnspentCoins.Commit();
     Assets.Commit();
     Contracts.Commit();
     Storages.Commit();
     HeaderHashList.Commit();
     NextValidators.Commit();
     BlockHashIndex.Commit();
     HeaderHashIndex.Commit();
 }
Beispiel #2
0
 public virtual void Commit()
 {
     Accounts.DeleteWhere((k, v) => !v.IsFrozen && v.Votes.Length == 0 && v.Balances.All(p => p.Value <= Fixed8.Zero));
     UnspentCoins.DeleteWhere((k, v) => v.Items.All(p => p.HasFlag(CoinState.Spent)));
     Blocks.Commit();
     Transactions.Commit();
     Accounts.Commit();
     UnspentCoins.Commit();
     Validators.Commit();
     Assets.Commit();
     Contracts.Commit();
     Storages.Commit();
     HeaderHashList.Commit();
     ValidatorsCount.Commit();
     BlockHashIndex.Commit();
     HeaderHashIndex.Commit();
 }