Fix a couple of style nits.

This commit is contained in:
Dave Collins 2014-01-09 11:36:25 -06:00
parent 18ac5c848a
commit 28f485a1d1
2 changed files with 2 additions and 4 deletions

View file

@ -17,7 +17,6 @@ import (
// The fastAdd argument modifies the behavior of the function by avoiding the // The fastAdd argument modifies the behavior of the function by avoiding the
// somewhat expensive operation: BIP34 validation, it also passes the argument // somewhat expensive operation: BIP34 validation, it also passes the argument
// down to connectBestChain() // down to connectBestChain()
func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block, fastAdd bool) error { func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block, fastAdd bool) error {
// Get a block node for the block previous to this one. Will be nil // Get a block node for the block previous to this one. Will be nil
// if this is the genesis block. // if this is the genesis block.
@ -40,8 +39,7 @@ func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block, fastAdd bool) error
if !fastAdd { if !fastAdd {
// Ensure the difficulty specified in the block header matches // Ensure the difficulty specified in the block header matches
// the calculated difficulty based on the previous block and // the calculated difficulty based on the previous block and
// difficulty // difficulty retarget rules.
// retarget rules.
expectedDifficulty, err := b.calcNextRequiredDifficulty(prevNode, block) expectedDifficulty, err := b.calcNextRequiredDifficulty(prevNode, block)
if err != nil { if err != nil {
return err return err
@ -78,6 +76,7 @@ func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block, fastAdd bool) error
} }
} }
// Ensure chain matches up to predetermined checkpoints. // Ensure chain matches up to predetermined checkpoints.
// It's safe to ignore the error on Sha since it's already cached. // It's safe to ignore the error on Sha since it's already cached.
blockHash, _ := block.Sha() blockHash, _ := block.Sha()

View file

@ -876,7 +876,6 @@ func (b *BlockChain) reorganizeChain(detachNodes, attachNodes *list.List) error
// cumulatively has the most proof of work. // cumulatively has the most proof of work.
// The fastAdd argument avoids the call to checkConnectBlock which does // The fastAdd argument avoids the call to checkConnectBlock which does
// several expensive transaction validation operations. // several expensive transaction validation operations.
func (b *BlockChain) connectBestChain(node *blockNode, block *btcutil.Block, fastAdd bool) error { func (b *BlockChain) connectBestChain(node *blockNode, block *btcutil.Block, fastAdd bool) error {
// We haven't selected a best chain yet or we are extending the main // We haven't selected a best chain yet or we are extending the main
// (best) chain with a new block. This is the most common case. // (best) chain with a new block. This is the most common case.