public Ledger(IPersistentAccountStore persistentStore) { this.LedgerTree = new ListHashTree(); this.persistentStore = persistentStore; this.TransactionFees = 0; this.TotalAmount = 0; //this.CloseTime = 0; }
public NodeState(NodeConfig nodeConfig) { PersistentAccountStore = new SQLiteAccountStore(nodeConfig); PersistentTransactionStore = new SQLiteTransactionStore(nodeConfig); PersistentBannedNameStore = new SQLiteBannedNames(nodeConfig); PersistentCloseHistory = new SQLiteCloseHistory(nodeConfig); Ledger = new Ledger(PersistentAccountStore); TransactionStateManager = new TransactionStateManager(); IncomingTransactionMap = new IncomingTransactionMap(this, nodeConfig, TransactionStateManager); GlobalBlacklistedValidators = new ConcurrentBag<Hash>(); GlobalBlacklistedUsers = new ConcurrentBag<Hash>(); ConnectedValidators = new HashSet<Hash>(); PendingNetworkRequests = new ConcurrentDictionary<Hash, PendingNetworkRequest>(); SystemTime = DateTime.UtcNow.ToFileTimeUtc(); NetworkTime = DateTime.UtcNow.ToFileTimeUtc(); }