coinbase verification at index > 0
This commit is contained in:
parent
fff3c29e6d
commit
eb24c5aff6
|
@ -130,6 +130,9 @@ impl ChainVerifier {
|
|||
|
||||
if sequence == 0 { return Ok(sigops); }
|
||||
|
||||
// must not be coinbase (sequence = 0 is returned above)
|
||||
if transaction.is_coinbase() { return Err(TransactionError::MisplacedCoinbase(sequence)); }
|
||||
|
||||
if sigops >= MAX_BLOCK_SIGOPS { return Err(TransactionError::Sigops(sigops)); }
|
||||
|
||||
// strict pay-to-script-hash signature operations count toward block
|
||||
|
|
|
@ -77,6 +77,8 @@ pub enum TransactionError {
|
|||
Sigops(usize),
|
||||
/// Too many signature operations once p2sh operations included
|
||||
SigopsP2SH(usize),
|
||||
/// Coinbase transaction is found at position that is not 0
|
||||
MisplacedCoinbase(usize),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
|
|
Loading…
Reference in New Issue