Skip to content

Commit

Permalink
signer: remove ineffectual assignments (#18049)
Browse files Browse the repository at this point in the history
* signer: remove ineffectual assignments

* signer: remove ineffectual assignments
  • Loading branch information
holiman authored and karalabe committed Nov 7, 2018
1 parent eea3ae4 commit 5b74bb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions signer/core/abihelper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
8 changes: 4 additions & 4 deletions signer/rules/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
})
Expand Down Expand Up @@ -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'")
}
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 5b74bb6

Please sign in to comment.