diff --git a/accept.go b/accept.go index 444eddb48..5e66436f9 100644 --- a/accept.go +++ b/accept.go @@ -23,7 +23,8 @@ func (b *BlockChain) maybeAcceptBlock(block *btcutil.Block) error { return err } - // The height of this block one more than the referenced previous block. + // The height of this block is one more than the referenced previous + // block. blockHeight := int64(0) if prevNode != nil { blockHeight = prevNode.height + 1 diff --git a/blocklocator.go b/blocklocator.go index a3258f253..fb2d408be 100644 --- a/blocklocator.go +++ b/blocklocator.go @@ -38,8 +38,8 @@ func (b *BlockChain) BlockLocatorFromHash(hash *btcwire.ShaHash) BlockLocator { } // Attempt to find the height of the block that corresponds to the - // passed hash, and if it's on a side chain, find the height at which - // it forks from the main chain. + // passed hash, and if it's on a side chain, also find the height at + // which it forks from the main chain. blockHeight := int64(-1) forkHeight := int64(-1) node, exists := b.index[*hash] diff --git a/chain.go b/chain.go index ff487ed42..0be5bc967 100644 --- a/chain.go +++ b/chain.go @@ -758,8 +758,8 @@ func (b *BlockChain) disconnectBlock(node *blockNode, block *btcutil.Block) erro // This node's parent is now the end of the best chain. b.bestChain = node.parent - // Notify the caller that the block was disconnect from the main chain. - // The caller would typically want to react with actions such as + // Notify the caller that the block was disconnected from the main + // chain. The caller would typically want to react with actions such as // updating wallets. b.sendNotification(NTBlockDisconnected, block) @@ -789,7 +789,7 @@ func (b *BlockChain) reorganizeChain(detachNodes, attachNodes *list.List) error // // NOTE: bitcoind does these checks directly when it connects a block. // The downside to that approach is that if any of these checks fail - // after disconneting some blocks or attaching others, all of the + // after disconnecting some blocks or attaching others, all of the // operations have to be rolled back to get the chain back into the // state it was before the rule violation (or other failure). There are // at least a couple of ways accomplish that rollback, but both involve diff --git a/validate.go b/validate.go index 9ab3d0c5e..352ce33cc 100644 --- a/validate.go +++ b/validate.go @@ -790,7 +790,7 @@ func (b *BlockChain) checkConnectBlock(node *blockNode, block *btcutil.Block) er } // Check for overflow or going over the limits. We have to do - // this on every loop to avoid overflow. + // this on every loop iteration to avoid overflow. lastSigops := totalSigOps totalSigOps += numsigOps if totalSigOps < lastSigops || totalSigOps > maxSigOpsPerBlock {