[NOD-1046] Delete redundant conversion from rule error (#755)

This commit is contained in:
Ori Newman 2020-06-11 12:19:49 +03:00 committed by GitHub
parent b6a6e577c4
commit b0d4a92e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -577,10 +577,6 @@ func (dag *BlockDAG) connectBlock(node *blockNode,
newBlockPastUTXO, txsAcceptanceData, newBlockFeeData, newBlockMultiSet, err :=
node.verifyAndBuildUTXO(dag, block.Transactions(), fastAdd)
if err != nil {
var ruleErr RuleError
if ok := errors.As(err, &ruleErr); ok {
return nil, ruleError(ruleErr.ErrorCode, fmt.Sprintf("error verifying UTXO for %s: %s", node, err))
}
return nil, errors.Wrapf(err, "error verifying UTXO for %s", node)
}