Check transaction count early in submitblock.
commit4f15ea102d15eb237b63464725508dc509e98819
authorGregory Maxwell <greg@xiph.org>
Sun, 2 Apr 2017 21:39:32 +0000 (2 21:39 +0000)
committerGregory Maxwell <greg@xiph.org>
Mon, 3 Apr 2017 07:15:36 +0000 (3 07:15 +0000)
treeed68b29e42f3cf9bf79e741203aca1b0e7e54a89
parentada0caa165905b50db351a56ec124518c922085a
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.
src/rpc/mining.cpp