Esempio n. 1
0
 public bool Spend(int position, out TxInUndo undo)
 {
     undo = null;
     if (position >= vout.Count)
     {
         return(false);
     }
     if (vout[position].IsNull)
     {
         return(false);
     }
     undo = new TxInUndo(vout[position].Clone());
     vout[position].SetNull();
     Cleanup();
     if (vout.Count == 0)
     {
         undo.Height   = nHeight;
         undo.CoinBase = fCoinBase;
         undo.Version  = nVersion;
     }
     return(true);
 }
Esempio n. 2
0
 public bool Spend(int position, out TxInUndo undo)
 {
     undo = null;
     if(position >= vout.Count)
         return false;
     if(vout[position].IsNull)
         return false;
     undo = new TxInUndo(vout[position].Clone());
     vout[position].SetNull();
     Cleanup();
     if(vout.Count == 0)
     {
         undo.Height = nHeight;
         undo.CoinBase = fCoinBase;
         undo.Version = nVersion;
     }
     return true;
 }