Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use proper meta input prevout (#1099)
A coinbase transaction in both bitcoin as well as in unit-e includes a meta input which does not spend anything and is skipped in validation. It's scriptSig contains block height and snapshot hash. The prevout of that input should be `0x00000` (which it is) and `0xFFFF` as index (currently uses 0). This is not correct and changed in this pull request. By using the default constructor of `COutPoint`, which in turn invokes `SetNull` (which sets the afore mentioned values), the right values are being filled in + delegated to the definition of `SetNull (as it should). The problem otherwise: Theoretically it is allowed for a transaction to have the hash `0x00...00` (although this will lead to other problems in the wallet...), but it is super unlikely that any transaction would ever have 2^16 number of inputs. That both happen is astronomically super black hole merger unlikely. Signed-off-by: Julian Fleischer <julian@thirdhash.com>
- Loading branch information
Showing
6 changed files
with
143 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.