private void ResetBatch() { _writeBatch = new WriteBatch(); _levelDbSnapshot?.Dispose(); _levelDbSnapshot = _db.GetSnapshot(); ReadOptions dbOptions = new ReadOptions { FillCache = false, Snapshot = _levelDbSnapshot }; _balances = new DbCache <Nep5BalanceKey, Nep5Balance>(_db, dbOptions, _writeBatch, Nep5BalancePrefix); if (_shouldTrackHistory) { _transfersSent = new DbCache <Nep5TransferKey, Nep5Transfer>(_db, dbOptions, _writeBatch, Nep5TransferSentPrefix); _transfersReceived = new DbCache <Nep5TransferKey, Nep5Transfer>(_db, dbOptions, _writeBatch, Nep5TransferReceivedPrefix); } }
private void ResetBatch() { _writeBatch = new WriteBatch(); _levelDbSnapshot?.Dispose(); _levelDbSnapshot = _db.GetSnapshot(); var dbOptions = new ReadOptions { FillCache = false, Snapshot = _levelDbSnapshot }; _userUnspentCoins = new DbCache <UserSystemAssetCoinOutputsKey, UserSystemAssetCoinOutputs>(_db, dbOptions, _writeBatch, SystemAssetUnspentCoinsPrefix); if (!_shouldTrackUnclaimed) { return; } _userSpentUnclaimedCoins = new DbCache <UserSystemAssetCoinOutputsKey, UserSystemAssetCoinOutputs>(_db, dbOptions, _writeBatch, SystemAssetSpentUnclaimedCoinsPrefix); }