public void Commit() { #if MultiThread if (!this.bWrite) { throw new Exception("Subthread Commit Error!"); } #endif Snap.Commit(); Blocks.Commit(); Heights.Commit(); Transfers.Commit(); Accounts.Commit(); Contracts.Commit(); Storages.Commit(); BlockChains.Commit(); StoragesMap.Commit(); ABC.Commit(); List.Commit(); Queue.Commit(); if (Undos != null) { batch?.Put($"Undos___{Undos.height}", JsonHelper.ToJson(new DbCache <DbUndo> .Slice() { obj = Undos })); batch?.Put("UndoHeight", Undos.height.ToString()); } db.Write(batch, new WriteOptions { Sync = true }); }
public void Commit() { Snap.Commit(); Blocks.Commit(); Heights.Commit(); Transfers.Commit(); Accounts.Commit(); Contracts.Commit(); Storages.Commit(); BlockChains.Commit(); StoragesAccount.Commit(); ABC.Commit(); List.Commit(); if (Undos != null) { batch?.Put($"Undos___{Undos.height}", JsonHelper.ToJson(new DbCache <DbUndo> .Slice() { obj = Undos })); batch.Put("UndoHeight", Undos.height.ToString()); } db.Write(batch, new WriteOptions { Sync = true }); }
public virtual void Commit() { Blocks.Commit(); Transactions.Commit(); Storages.Commit(); HeaderHashList.Commit(); BlockHashIndex.Commit(); HeaderHashIndex.Commit(); }
public virtual void Commit() { Blocks.Commit(); Transactions.Commit(); Contracts.Commit(); Storages.Commit(); HeaderHashList.Commit(); BlockHashIndex.Commit(); HeaderHashIndex.Commit(); AppChains.Commit(); AppChainState.Commit(); NativeNEP5s.Commit(); }
public void Commit() { Snap.Commit(); Blocks.Commit(); Heights.Commit(); Transfers.Commit(); Accounts.Commit(); Contracts.Commit(); Storages.Commit(); BlockChains.Commit(); StoragesMap.Commit(); ABC.Commit(); List.Commit(); }
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(); }
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(); }