Exemplo n.º 1
0
        public void Commit()
        {
            Snap.Commit();
            Blocks.Commit();
            Heights.Commit();
            Transfers.Commit();
            Accounts.Commit();
            Contracts.Commit();
            Storages.Commit();
            TFA.Commit();
            BlockChains.Commit();
            StoragesAccount.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
            });
        }
Exemplo n.º 2
0
 public void BindTransfer2Account(string account, long transfersIndex, string transfer)
 {
     TFA.Add($"{account}_{transfersIndex}", transfer);
 }