You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Tensor, I have a question pertaining to the FindUnspentTransactions method.
What I want to know is why the check for whether the Transaction is a Coinbase is done after the for loop through the transactions outputs. Should it be done before the for loop so that there will be spentTXOs to iterate through?
The text was updated successfully, but these errors were encountered:
I believe it needs to append the unspent transactions first, before it can add the spentTx's.
So on the first run of that function the spent transactions will be nil, so than coinbase account gets the unspent transactions. Then the next time its run it will be able to add the spent transactions if they occurred.
ok understood. @WhiteRaBot17
Another bunch of questions,
From the definition of an unspent transaction is a "transaction that have outputs that are not referenced by other inputs". Does this refer to AT LEAST one output that isn't referenced by other inputs, or ALL outputs aren't referenced by other inputs?
The code snippet below
if out.CanBeUnlocked(address) {
unspentTxs = append(unspentTxs, *tx)
}
How does checking for whether an output can be unlocked indicate whether an output is referenced by inputs and confirm whether the transaction is unspent?
Hi Tensor, I have a question pertaining to the FindUnspentTransactions method.
What I want to know is why the check for whether the Transaction is a Coinbase is done after the for loop through the transactions outputs. Should it be done before the for loop so that there will be spentTXOs to iterate through?
The text was updated successfully, but these errors were encountered: