Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bitcoin_transfer/transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ foreach (TxOut output in outputs)
}
```

Now let's examine the **inputs**. If you look at them you will notice a previous output is referenced. Each input shows you which previous out has been spent in order to fund this transaction.
Now let's examine the **inputs**. If you look at them, you will notice a previous output is referenced. Each input shows you which previous out has been spent in order to fund this transaction.

```cs
var inputs = transaction.Inputs;
foreach (TxIn input in inputs)
{
//Get each previous output which is referenced from another previous transaction.
OutPoint previousOutpoint = input.PrevOut;
Console.WriteLine(previousOutpoint.Hash); // hash of prev tx
Console.WriteLine(previousOutpoint.N); // idx of out from prev tx, that has been spent in the current tx
Expand Down