Export CountP2SHSigOps.
This commit is contained in:
parent
ec641751a8
commit
b59a15d07e
1 changed files with 3 additions and 3 deletions
|
@ -318,11 +318,11 @@ func CountSigOps(tx *btcutil.Tx) int {
|
||||||
return totalSigOps
|
return totalSigOps
|
||||||
}
|
}
|
||||||
|
|
||||||
// countP2SHSigOps returns the number of signature operations for all input
|
// CountP2SHSigOps returns the number of signature operations for all input
|
||||||
// transactions which are of the pay-to-script-hash type. This uses the
|
// transactions which are of the pay-to-script-hash type. This uses the
|
||||||
// precise, signature operation counting mechanism from btcscript which requires
|
// precise, signature operation counting mechanism from btcscript which requires
|
||||||
// access to the input transaction scripts.
|
// access to the input transaction scripts.
|
||||||
func countP2SHSigOps(tx *btcutil.Tx, isCoinBaseTx bool, txStore TxStore) (int, error) {
|
func CountP2SHSigOps(tx *btcutil.Tx, isCoinBaseTx bool, txStore TxStore) (int, error) {
|
||||||
// Coinbase transactions have no interesting inputs.
|
// Coinbase transactions have no interesting inputs.
|
||||||
if isCoinBaseTx {
|
if isCoinBaseTx {
|
||||||
return 0, nil
|
return 0, nil
|
||||||
|
@ -778,7 +778,7 @@ func (b *BlockChain) checkConnectBlock(node *blockNode, block *btcutil.Block) er
|
||||||
// countP2SHSigOps for whether or not the transaction is
|
// countP2SHSigOps for whether or not the transaction is
|
||||||
// a coinbase transaction rather than having to do a
|
// a coinbase transaction rather than having to do a
|
||||||
// full coinbase check again.
|
// full coinbase check again.
|
||||||
numP2SHSigOps, err := countP2SHSigOps(tx, i == 0,
|
numP2SHSigOps, err := CountP2SHSigOps(tx, i == 0,
|
||||||
txInputStore)
|
txInputStore)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue