chore: gofumpt (#11839)
* fumpt using main not master... * be more descriptive * fumpt * fix nits Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
Julien Robert
parent
bc2d553f77
commit
55054282d2
@@ -30,7 +30,6 @@ func TestRegisterError(t *testing.T) {
|
||||
// add a new error on a sealed registry
|
||||
error = RegisterError(1024, "bytes", false, "bytes")
|
||||
assert.NotNil(t, error)
|
||||
|
||||
}
|
||||
|
||||
func TestError_Error(t *testing.T) {
|
||||
@@ -58,12 +57,12 @@ func TestToRosetta(t *testing.T) {
|
||||
assert.NotNil(t, ToRosetta(&MyError{}))
|
||||
}
|
||||
|
||||
type MyError struct {
|
||||
}
|
||||
type MyError struct{}
|
||||
|
||||
func (e *MyError) Error() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (e *MyError) Is(err error) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -129,7 +129,6 @@ func (on OnlineNetwork) ConstructionParse(ctx context.Context, request *types.Co
|
||||
AccountIdentifierSigners: signers,
|
||||
Metadata: nil,
|
||||
}, nil
|
||||
|
||||
}
|
||||
|
||||
// ConstructionPayloads Payloads is called with an array of operations and the response from
|
||||
|
||||
@@ -13,8 +13,10 @@ import (
|
||||
crgtypes "github.com/cosmos/cosmos-sdk/server/rosetta/lib/types"
|
||||
)
|
||||
|
||||
const DefaultRetries = 5
|
||||
const DefaultRetryWait = 5 * time.Second
|
||||
const (
|
||||
DefaultRetries = 5
|
||||
DefaultRetryWait = 5 * time.Second
|
||||
)
|
||||
|
||||
// Settings define the rosetta server settings
|
||||
type Settings struct {
|
||||
@@ -55,9 +57,7 @@ func NewServer(settings Settings) (Server, error) {
|
||||
return Server{}, fmt.Errorf("cannot build asserter: %w", err)
|
||||
}
|
||||
|
||||
var (
|
||||
adapter crgtypes.API
|
||||
)
|
||||
var adapter crgtypes.API
|
||||
switch settings.Offline {
|
||||
case true:
|
||||
adapter, err = newOfflineAdapter(settings)
|
||||
|
||||
Reference in New Issue
Block a user