public bool Spend(int position, out TxInUndo undo) { undo = null; if (position >= this.Outputs.Count) { return(false); } if (IsNull(this.Outputs[position])) { return(false); } undo = new TxInUndo(this.Outputs[position].Clone()); this.Outputs[position] = NullTxOut; Cleanup(); if (this.IsEmpty) { undo.Height = this.nHeight; undo.CoinBase = this.CoinBase; undo.Version = this.nVersion; } return(true); }
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); }
#pragma warning disable CS0612 // Type or member is obsolete public bool Spend(int position, out TxInUndo undo) { undo = null; if (position >= Outputs.Count) { return(false); } if (IsNull(Outputs[position])) { return(false); } undo = new TxInUndo(Outputs[position].Clone()); #pragma warning restore CS0612 // Type or member is obsolete Outputs[position] = NullTxOut; Cleanup(); if (IsEmpty) { undo.Height = nHeight; undo.CoinBase = CoinBase; undo.Version = nVersion; } return(true); }
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; }