Page MenuHomePhabricator

ConnectBlock : count sigops in one place
ClosedPublic

Authored by markblundeberg on Jan 27 2020, 13:26.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable