diff options
author | Martin Holst Swende <martin@swende.se> | 2018-11-07 20:55:54 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-11-07 20:55:54 +0800 |
commit | 5b74bb6445a7fb7220da74c6c6e891c20e9a26dc (patch) | |
tree | f574f0b0f8f3763f0fb524664e630ec8a1f73f3f | |
parent | eea3ae42a3d9bcbd33474c0e482754c5196a469f (diff) | |
download | go-tangerine-5b74bb6445a7fb7220da74c6c6e891c20e9a26dc.tar.gz go-tangerine-5b74bb6445a7fb7220da74c6c6e891c20e9a26dc.tar.zst go-tangerine-5b74bb6445a7fb7220da74c6c6e891c20e9a26dc.zip |
signer: remove ineffectual assignments (#18049)
* signer: remove ineffectual assignments
* signer: remove ineffectual assignments
-rw-r--r-- | signer/core/abihelper_test.go | 6 | ||||
-rw-r--r-- | signer/rules/rules_test.go | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/signer/core/abihelper_test.go b/signer/core/abihelper_test.go index 2afeec73e..878210be1 100644 --- a/signer/core/abihelper_test.go +++ b/signer/core/abihelper_test.go @@ -38,13 +38,13 @@ func verify(t *testing.T, jsondata, calldata string, exp []interface{}) { cd := common.Hex2Bytes(calldata) sigdata, argdata := cd[:4], cd[4:] method, err := abispec.MethodById(sigdata) - if err != nil { t.Fatal(err) } - data, err := method.Inputs.UnpackValues(argdata) - + if err != nil { + t.Fatal(err) + } if len(data) != len(exp) { t.Fatalf("Mismatched length, expected %d, got %d", len(exp), len(data)) } diff --git a/signer/rules/rules_test.go b/signer/rules/rules_test.go index 55614077c..0b520a15b 100644 --- a/signer/rules/rules_test.go +++ b/signer/rules/rules_test.go @@ -151,7 +151,7 @@ func TestListRequest(t *testing.T) { t.Errorf("Couldn't create evaluator %v", err) return } - resp, err := r.ApproveListing(&core.ListRequest{ + resp, _ := r.ApproveListing(&core.ListRequest{ Accounts: accs, Meta: core.Metadata{Remote: "remoteip", Local: "localip", Scheme: "inproc"}, }) @@ -515,7 +515,7 @@ func TestLimitWindow(t *testing.T) { r.OnApprovedTx(response) } // Fourth should fail - resp, err := r.ApproveTx(dummyTx(h)) + resp, _ := r.ApproveTx(dummyTx(h)) if resp.Approved { t.Errorf("Expected check to resolve to 'Reject'") } @@ -609,8 +609,8 @@ func TestContextIsCleared(t *testing.T) { t.Fatalf("Failed to load bootstrap js: %v", err) } tx := dummyTxWithV(0) - r1, err := r.ApproveTx(tx) - r2, err := r.ApproveTx(tx) + r1, _ := r.ApproveTx(tx) + r2, _ := r.ApproveTx(tx) if r1.Approved != r2.Approved { t.Errorf("Expected execution context to be cleared between executions") } |