Skip to content

Commit

Permalink
blockchain, btcjson, wire: make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
kcalvinalvin committed Oct 23, 2024
1 parent 68c8197 commit c1bc268
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions blockchain/utreexoviewpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ func (b *BlockChain) VerifyUData(ud *wire.UData, txIns []*wire.TxIn, remember bo
str += fmt.Sprintf("%s\n", txIn.PreviousOutPoint.String())
}

return fmt.Errorf(str)
return fmt.Errorf("%v", str)
}

// Make a slice of hashes from LeafDatas. These are the hash commitments
Expand Down Expand Up @@ -954,7 +954,7 @@ func (b *BlockChain) VerifyUData(ud *wire.UData, txIns []*wire.TxIn, remember bo
ud.LeafDatas[i].String(), hex.EncodeToString(leafHash[:]))
}
str += fmt.Sprintf("err: %s", err.Error())
return fmt.Errorf(str)
return fmt.Errorf("%v", str)
}

if remember {
Expand Down
2 changes: 1 addition & 1 deletion btcjson/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func resultTypeHelp(xT descLookupFunc, rt reflect.Type, fieldDescKey string) str
w.Init(&formatted, 0, 4, 1, ' ', 0)
for i, text := range results {
if i == len(results)-1 {
fmt.Fprintf(w, text)
fmt.Fprint(w, text)
} else {
fmt.Fprintln(w, text)
}
Expand Down
4 changes: 2 additions & 2 deletions wire/batchproof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestBatchProofSerializeSize(t *testing.T) {
if BatchProofSerializeSize(&test.bp) != test.size {
err := fmt.Errorf("TestBatchProofSerializeSize \"%s\": expected size of %d but got %d",
test.name, test.size, BatchProofSerializeSize(&test.bp))
t.Errorf(err.Error())
t.Error(err)
}

var buf bytes.Buffer
Expand All @@ -149,7 +149,7 @@ func TestBatchProofSerializeSize(t *testing.T) {
if test.size != len(buf.Bytes()) {
err := fmt.Errorf("TestBatchProofSerializeSize \"%s\": serialized bytes len of %d but serialize size of %d",
test.name, len(buf.Bytes()), BatchProofSerializeSize(&test.bp))
t.Errorf(err.Error())
t.Error(err)
}
}
}
Expand Down

0 comments on commit c1bc268

Please sign in to comment.