Пример #1
0
 public IEnumerable <PrivateKey> ListMyAddresses()
 {
     lock (_lock4privateKeysCache)
     {
         if (_privateKeysCache == null)
         {
             _privateKeysCache = new List <PrivateKey>(PrivateKey.GetAll(DB));
         }
         return(_privateKeysCache.ToList());
     }
 }
Пример #2
0
 internal PrivateKey FindPrivateKey(GetPubkey getpubkey)
 {
     lock (_lock4privateKeysCache)
     {
         if (_privateKeysCache == null)
         {
             _privateKeysCache = new List <PrivateKey>(PrivateKey.GetAll(DB));
         }
         return(_privateKeysCache.FirstOrDefault(key => ((key.Hash4DB == getpubkey.Hash4DB) &&
                                                         (key.Version4DB == getpubkey.Version4DB) &&
                                                         (key.Stream4DB == getpubkey.Stream4DB)
                                                         )));
     }
 }