internal void ConfirmSend(Transaction tx)
{
lock (this)
{
Debug.Assert(!Pending.ContainsKey(tx.Hash), "confirmSend called on the same transaction twice");
_log.InfoFormat("confirmSend of {0}", tx.HashAsString);
// Mark the outputs of the used transactions as spent, so we don't try and spend it again.
foreach (var input in tx.Inputs)
{
var connectedOutput = input.Outpoint.ConnectedOutput;
var connectedTx = connectedOutput.ParentTransaction;
connectedOutput.MarkAsSpent(input);
MaybeMoveTxToSpent(connectedTx, "spent tx");
}
// Add to the pending pool. It'll be moved out once we receive this transaction on the best chain.
Pending[tx.Hash] = tx;
}
}