Skip to content

Conversation

gmaxwell
Copy link
Contributor

@gmaxwell gmaxwell commented Apr 4, 2017

Check transaction count early in submitblock.

There is no point in even hashing a submitted block which doesn't have a coinbase transaction.

This also results in more useful error reporting on corrupted input.

Thanks to rawodb for the bug report.

gmaxwell added 3 commits April 2, 2017 21:28
…txn.

This isn't actually needed anywhere, but it's less brittle.
There is no point in even hashing a submitted block which doesn't have
 a coinbase transaction.

This also results in more useful error reporting on corrupted input.

Thanks to rawodb for the bug report.
@laanwj
Copy link
Member

laanwj commented Apr 4, 2017

utACK 30f30c0

@laanwj laanwj added this to the 0.14.1 milestone Apr 4, 2017
@jonasschnelli
Copy link
Contributor

utACK 30f30c0

@paveljanik
Copy link
Contributor

utACK 30f30c0

@laanwj
Copy link
Member

laanwj commented Apr 4, 2017

Reminder: this needs a functional test to prevent regression, but not necessary in this PR.

@laanwj laanwj merged commit 30f30c0 into bitcoin:master Apr 4, 2017
laanwj added a commit that referenced this pull request Apr 4, 2017
30f30c0 Add braces to submitblock per current style. (Gregory Maxwell)
4f15ea1 Check transaction count early in submitblock. (Gregory Maxwell)
ada0caa Make GetWitnessCommitmentIndex callable on blocks without a coinbase txn. (Gregory Maxwell)

Tree-SHA512: 02dcd337ad9cdd8e4fa6a42c009d016026d1229c193676ed6fcc9ce55e924fedec57f516ac1e95c3db0985243ba908307338ce783a70416cb292bed881002bfc
laanwj pushed a commit that referenced this pull request Apr 4, 2017
…txn.

This isn't actually needed anywhere, but it's less brittle.

Github-Pull: #10146
Rebased-From: ada0caa
laanwj pushed a commit that referenced this pull request Apr 4, 2017
There is no point in even hashing a submitted block which doesn't have
 a coinbase transaction.

This also results in more useful error reporting on corrupted input.

Thanks to rawodb for the bug report.

Github-Pull: #10146
Rebased-From: 4f15ea1
@jnewbery
Copy link
Contributor

Regression test here: #10190

codablock pushed a commit to codablock/dash that referenced this pull request Jan 26, 2018
30f30c0 Add braces to submitblock per current style. (Gregory Maxwell)
4f15ea1 Check transaction count early in submitblock. (Gregory Maxwell)
ada0caa Make GetWitnessCommitmentIndex callable on blocks without a coinbase txn. (Gregory Maxwell)

Tree-SHA512: 02dcd337ad9cdd8e4fa6a42c009d016026d1229c193676ed6fcc9ce55e924fedec57f516ac1e95c3db0985243ba908307338ce783a70416cb292bed881002bfc
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
30f30c0 Add braces to submitblock per current style. (Gregory Maxwell)
4f15ea1 Check transaction count early in submitblock. (Gregory Maxwell)
ada0caa Make GetWitnessCommitmentIndex callable on blocks without a coinbase txn. (Gregory Maxwell)

Tree-SHA512: 02dcd337ad9cdd8e4fa6a42c009d016026d1229c193676ed6fcc9ce55e924fedec57f516ac1e95c3db0985243ba908307338ce783a70416cb292bed881002bfc
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 27, 2019
30f30c0 Add braces to submitblock per current style. (Gregory Maxwell)
4f15ea1 Check transaction count early in submitblock. (Gregory Maxwell)
ada0caa Make GetWitnessCommitmentIndex callable on blocks without a coinbase txn. (Gregory Maxwell)

Tree-SHA512: 02dcd337ad9cdd8e4fa6a42c009d016026d1229c193676ed6fcc9ce55e924fedec57f516ac1e95c3db0985243ba908307338ce783a70416cb292bed881002bfc
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
@bitcoin bitcoin unlocked this conversation Nov 21, 2024
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants