public void MergeFrom(Coins otherCoin) { var diff = otherCoin.Outputs.Count - this.Outputs.Count; if (diff > 0) { Outputs.Resize(otherCoin.Outputs.Count); for (int i = 0; i < Outputs.Count; i++) { if (Outputs[i] == null) { Outputs[i] = new TxOut(); } } } for (int i = 0; i < otherCoin.Outputs.Count; i++) { if (!otherCoin.Outputs[i].IsNull) { Outputs[i] = otherCoin.Outputs[i]; } } UpdateValue(); }
public void SetCoins(uint256 txId, Coins coins) { Index.Put(txId.ToString(), coins); }