public void RefreshAsync(string accountId) { PosNode node; if (AllNodes.ContainsKey(accountId)) { node = AllNodes[accountId]; node.LastStaking = DateTime.Now; } }
public PosNode Add(PosNode node) { if (!AllNodes.ContainsKey(node.AccountID)) { AllNodes.Add(node.AccountID, node); } else { AllNodes[node.AccountID].IPAddress = node.IPAddress; // support for dynamic IP address } node.LastStaking = DateTime.Now; return(node); }
public async Task <PosNode> AddAsync(PosNode node) { if (!AllNodes.ContainsKey(node.AccountID)) { AllNodes.Add(node.AccountID, node); } else { AllNodes[node.AccountID].IP = node.IP; // support for dynamic IP address } node.LastStaking = DateTime.Now; // lookup balance var block = await BlockChain.Singleton.FindLatestBlockAsync(node.AccountID); if (block != null && block.Balances != null && block.Balances.ContainsKey(LyraGlobal.LYRATICKERCODE)) { node.Balance = block.Balances[LyraGlobal.LYRATICKERCODE]; } return(node); }
public bool HasNode(string accountId) { return(AllNodes.ContainsKey(accountId)); }