diff --git a/internal_test.go b/internal_test.go index 282804f9..f364167c 100644 --- a/internal_test.go +++ b/internal_test.go @@ -16,12 +16,6 @@ import ( "time" ) -// TstCheckBlockSanity makes the internal checkBlockSanity function available to -// the test package. -func (b *BlockChain) TstCheckBlockSanity(block *btcutil.Block) error { - return b.checkBlockSanity(block) -} - // TstSetCoinbaseMaturity makes the ability to set the coinbase maturity // available to the test package. func TstSetCoinbaseMaturity(maturity int64) { diff --git a/process.go b/process.go index 72ecd445..fa4e70dc 100644 --- a/process.go +++ b/process.go @@ -112,7 +112,7 @@ func (b *BlockChain) ProcessBlock(block *btcutil.Block) error { } // Perform preliminary sanity checks on the block and its transactions. - err = b.checkBlockSanity(block) + err = b.CheckBlockSanity(block) if err != nil { return err } diff --git a/validate.go b/validate.go index 3e6ef567..700c0045 100644 --- a/validate.go +++ b/validate.go @@ -388,9 +388,9 @@ func countP2SHSigOps(tx *btcutil.Tx, isCoinBaseTx bool, txStore TxStore) (int, e return totalSigOps, nil } -// checkBlockSanity performs some preliminary checks on a block to ensure it is +// CheckBlockSanity performs some preliminary checks on a block to ensure it is // sane before continuing with block processing. These checks are context free. -func (b *BlockChain) checkBlockSanity(block *btcutil.Block) error { +func (b *BlockChain) CheckBlockSanity(block *btcutil.Block) error { // NOTE: bitcoind does size limits checking here, but the size limits // have already been checked by btcwire for incoming blocks. Also, // btcwire checks the size limits on send too, so there is no need diff --git a/validate_test.go b/validate_test.go index 004c490b..6ce1e09a 100644 --- a/validate_test.go +++ b/validate_test.go @@ -24,7 +24,7 @@ func TestCheckBlockSanity(t *testing.T) { defer teardownFunc() block := btcutil.NewBlock(&Block100000) - err = chain.TstCheckBlockSanity(block) + err = chain.CheckBlockSanity(block) if err != nil { t.Errorf("CheckBlockSanity: %v", err) }