CRYPTO NEWS

Participate In the Mind Music Multichain Fair Launch. Only 4 Days Left!

After a successful launch, having released one of the best NFT collections to date, and coin pretty resistant to the ups and downs of the market, Mind Music is all geared up for the multi-chain launch scheduled for June 24, 2022. Multi-chain is the future of the crypto industry since it bridges the gap between …

The only factor to distinguish coin base transactions

In bitcoin source code here is a function to check if the given transaction is coin base or not. Here is the function: bool IsCoinBase() const { return (vin.size() == 1 && vin[0].prevout.IsNull()); } My question is that does it really need to check if vin.size() is equal to 1? Isn’t vin[0].prevoud.IsNull() sufficient condition for::Listen

In bitcoin source code here is a function to check if the given transaction is coin base or not. Here is the function:

    bool IsCoinBase() const     {         return (vin.size() == 1 && vin[0].prevout.IsNull());     } 

My question is that does it really need to check if vin.size() is equal to 1? Isn’t vin[0].prevoud.IsNull() sufficient condition for a transaction to be coin base? Is there any situation that the later condition is true but we have more than one input?

The only reason I can guess is to avoid run-time error when vin is empty (So there is no vin[0]).

Crypto Hats, Crypto Shirts, Crypto Socks, Crypto Clothing

Participate In the Mind Music Multichain Fair Launch. Only 4 Days Left!

Shopping cart
There are no products in the cart!
Continue shopping
0