Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-forbes committed Sep 8, 2022
1 parent 42b365b commit 6895ace
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
1 change: 0 additions & 1 deletion app/test/fuzz_abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,4 @@ func TestFuzzPrepareProcessProposal(t *testing.T) {
})
}
}

}
40 changes: 1 addition & 39 deletions testutil/payment/testutil.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
package payment_testutil
package paytestutil

import (
"bytes"
"testing"

"github.com/celestiaorg/celestia-app/app"
"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/nmt/namespace"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -135,25 +131,6 @@ const (
TestAccountName = "test-account"
)

func generateKeyring(t *testing.T, cdc codec.Codec, accts ...string) keyring.Keyring {
t.Helper()
kb := keyring.NewInMemory(cdc)

for _, acc := range accts {
_, _, err := kb.NewMnemonic(acc, keyring.English, "", "", hd.Secp256k1)
if err != nil {
t.Error(err)
}
}

_, err := kb.NewAccount(testAccName, testMnemo, "1234", "", hd.Secp256k1)
if err != nil {
panic(err)
}

return kb
}

func randomValidNamespace() namespace.ID {
for {
s := tmrand.Bytes(8)
Expand All @@ -162,18 +139,3 @@ func randomValidNamespace() namespace.ID {
}
}
}

// generateKeyringSigner creates a types.KeyringSigner with keys generated for
// the provided accounts
func generateKeyringSigner(t *testing.T, acct string) *types.KeyringSigner {
encCfg := encoding.MakeConfig(app.ModuleEncodingRegisters...)
kr := generateKeyring(t, encCfg.Codec, acct)
return types.NewKeyringSigner(kr, acct, testChainID)
}

const (
// nolint:lll
testMnemo = `ramp soldier connect gadget domain mutual staff unusual first midnight iron good deputy wage vehicle mutual spike unlock rocket delay hundred script tumble choose`
testAccName = "test-account"
testChainID = "test-chain-1"
)

0 comments on commit 6895ace

Please sign in to comment.