Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant Validity check. #21

Open
jfsuarezb opened this issue Jul 8, 2020 · 1 comment
Open

Redundant Validity check. #21

jfsuarezb opened this issue Jul 8, 2020 · 1 comment

Comments

@jfsuarezb
Copy link

aUnspentTxOuts.find((uTxO) => uTxO.txOutId === txIn.txOutId && uTxO.txOutIndex === txIn.txOutIndex);

Why is the equality between the unspent transaction id and the new transaction uxto reference id being checked for twice? Why can't you just do uTxO.txOutId === txIn.txOutId instead of uTxO.txOutId === txIn.txOutId && uTxO.txOutId === txIn.txOutId?

@qwertyuu
Copy link

They might have wanted to say uTxO.TxOutIndex == txIn.TxOutIndex && uTxO.TxId == txIn.TxId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants