Example #1
0
        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
            });
        }
Example #2
0
        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
            });
        }
Example #3
0
 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();
 }