In the 'tx messages' section for protocol rules we have
- Each output value, as well as the total, must be in legal money range
- For each input, if the referenced output does not exist (e.g. never existed or has already been spent), reject this transaction
If my understanding is correct, rule 4 will confirm 0 <= output, sum of outputs <= 21,000,000, and rule 12 is checking that each input is in the UTXO set. I am having a hard time seeing why rule 4 is necessary, it seems like other rules - such as rule 12 - would already invalidate a transaction that was not in legal range. No one could ever have > 21,000,000 bitcoin so there could never be utxos for more 21,000,000.
Also, where can I find the code for these checks in the source code.
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments