예제 #1
0
 public void RemoveSelected(UTXO[] utxos)
 {
     foreach (var utxo in utxos)
     {
         _Repo.Delete <UTXO>("1", utxo.Outpoint.ToString());
     }
 }
예제 #2
0
        internal int Unlock(uint256 transactionId)
        {
            int unlocked = 0;
            var existing = _Repo.List <UTXO>("1");

            foreach (var utxo in existing)
            {
                if (utxo.LockedBy == transactionId)
                {
                    _Repo.Delete <UTXO>("1", utxo.Outpoint.ToString());
                    unlocked++;
                }
            }
            return(unlocked);
        }