mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
signer/fourbyte: consume less memory in test
This commit is contained in:
parent
611887b0bd
commit
70f6670974
1 changed files with 3 additions and 3 deletions
|
|
@ -17,8 +17,8 @@
|
||||||
package fourbyte
|
package fourbyte
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/ethereum/go-ethereum/accounts/abi"
|
||||||
|
|
@ -32,14 +32,14 @@ func TestEmbeddedDatabase(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
var abistruct abi.ABI
|
||||||
for id, selector := range db.embedded {
|
for id, selector := range db.embedded {
|
||||||
abistring, err := parseSelector(selector)
|
abistring, err := parseSelector(selector)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Failed to convert selector to ABI: %v", err)
|
t.Errorf("Failed to convert selector to ABI: %v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
abistruct, err := abi.JSON(strings.NewReader(string(abistring)))
|
if err := json.Unmarshal(abistring, &abistruct); err != nil {
|
||||||
if err != nil {
|
|
||||||
t.Errorf("Failed to parse ABI: %v", err)
|
t.Errorf("Failed to parse ABI: %v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue