Skip to content

Commit

Permalink
Catch missed error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cjepson committed Apr 19, 2016
1 parent a339852 commit 82a0e17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blockchain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1359,8 +1359,8 @@ func (b *BlockChain) forceHeadReorganization(formerBest chainhash.Hash,

// Child to reorganize to is missing.
if newBestNode == nil {
ruleError(ErrForceReorgMissingChild, "missing child of common parent "+
"for forced reorg")
return ruleError(ErrForceReorgMissingChild, "missing child of "+
"common parent for forced reorg")
}

newBestBlock, err := b.getBlockFromHash(&newBest)
Expand Down
2 changes: 1 addition & 1 deletion blockchain/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ func (b *BlockChain) checkDupTxs(node *blockNode, parentNode *blockNode,
if err != nil {
str := fmt.Sprintf("Failed dup tx check of TxTreeRegular of cur "+
"block: %v", err.Error())
ruleError(ErrDuplicateTx, str)
return ruleError(ErrDuplicateTx, str)
}

return nil
Expand Down

0 comments on commit 82a0e17

Please sign in to comment.