HomePhabricator

ConnectBlock : count sigops in one place

Description

ConnectBlock : count sigops in one place

Summary:
We can merge the coinbase sigops special case into the second
loop in such a manner. It works because GetTransactionSigOpCount
functions properly on coinbase txns.

The one wrinkle is that normal transactions need CheckTxInputs
to be run on them, but CheckTxInputs does not permit coinbases.

(Alternatively we could modify CheckTxInputs to allow coinbases,
and have it set fee=0. But I think I prefer this way.)

Depends on D5076

Test Plan: ninja check-extended

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5077

Details

Provenance
Mark Lundeberg <markblundeberg@users.noreply.github.com>Authored on Jan 27 2020, 12:41
markblundebergPushed on Jan 28 2020, 12:16
Reviewer
Restricted Project
Differential Revision
D5077: ConnectBlock : count sigops in one place
Parents
rSTAGINGd6e89de94369: make per-tx sigops limit contextual
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <markblundeberg@users.noreply.github.com> committed rSTAGING11553877caa8: ConnectBlock : count sigops in one place (authored by Mark Lundeberg <markblundeberg@users.noreply.github.com>).Jan 28 2020, 11:49