From 4eee6f8ba5de367bc0776c363efe198308fe56b2 Mon Sep 17 00:00:00 2001 From: Christopher Tarry Date: Thu, 21 Mar 2024 16:38:46 -0400 Subject: [PATCH] linter fix --- .golangci.yml | 4 +++- persist/sqlite/consensus_test.go | 16 ++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 6adc4e55..0d11f13f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -154,7 +154,9 @@ issues: # But independently from this option we use default exclude patterns, # it can be disabled by `exclude-use-default: false`. To list all # excluded by default patterns execute `golangci-lint run --help` - exclude: [] + exclude: + - "ifElseChain:.*" + - "exitAfterDefer:.*" # Independently from option `exclude` we use default exclude patterns, # it can be disabled by this option. To list all diff --git a/persist/sqlite/consensus_test.go b/persist/sqlite/consensus_test.go index 02e79496..d16d5bee 100644 --- a/persist/sqlite/consensus_test.go +++ b/persist/sqlite/consensus_test.go @@ -276,14 +276,14 @@ func TestSendTransactions(t *testing.T) { } checkTransaction := func(expectTxn types.Transaction, gotTxn explorer.Transaction) { - if len(expectTxn.SiacoinInputs) != len(expectTxn.SiacoinInputs) { - t.Fatalf("expected %d siacoin inputs, got %d", len(expectTxn.SiacoinInputs), len(expectTxn.SiacoinInputs)) - } else if len(expectTxn.SiacoinOutputs) != len(expectTxn.SiacoinOutputs) { - t.Fatalf("expected %d siacoin outputs, got %d", len(expectTxn.SiacoinOutputs), len(expectTxn.SiacoinOutputs)) - } else if len(expectTxn.SiafundInputs) != len(expectTxn.SiafundInputs) { - t.Fatalf("expected %d siafund inputs, got %d", len(expectTxn.SiafundInputs), len(expectTxn.SiafundInputs)) - } else if len(expectTxn.SiafundOutputs) != len(expectTxn.SiafundOutputs) { - t.Fatalf("expected %d siafund outputs, got %d", len(expectTxn.SiafundOutputs), len(expectTxn.SiafundOutputs)) + if len(expectTxn.SiacoinInputs) != len(gotTxn.SiacoinInputs) { + t.Fatalf("expected %d siacoin inputs, got %d", len(expectTxn.SiacoinInputs), len(gotTxn.SiacoinInputs)) + } else if len(expectTxn.SiacoinOutputs) != len(gotTxn.SiacoinOutputs) { + t.Fatalf("expected %d siacoin outputs, got %d", len(expectTxn.SiacoinOutputs), len(gotTxn.SiacoinOutputs)) + } else if len(expectTxn.SiafundInputs) != len(gotTxn.SiafundInputs) { + t.Fatalf("expected %d siafund inputs, got %d", len(expectTxn.SiafundInputs), len(gotTxn.SiafundInputs)) + } else if len(expectTxn.SiafundOutputs) != len(gotTxn.SiafundOutputs) { + t.Fatalf("expected %d siafund outputs, got %d", len(expectTxn.SiafundOutputs), len(gotTxn.SiafundOutputs)) } for i := range expectTxn.SiacoinInputs {