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.
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.
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.