Skip to content

Commit

Permalink
core/types: using maps.Clone (ethereum#29398)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuiweixie authored Apr 1, 2024
1 parent c39d00e commit 6c9f702
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/types/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"encoding/json"
"errors"
"fmt"
"maps"
"math/big"
"reflect"
"testing"
Expand Down Expand Up @@ -515,10 +516,7 @@ func TestYParityJSONUnmarshalling(t *testing.T) {
test := test
t.Run(fmt.Sprintf("txType=%d: %s", txType, test.name), func(t *testing.T) {
// Copy the base json
testJson := make(map[string]interface{})
for k, v := range baseJson {
testJson[k] = v
}
testJson := maps.Clone(baseJson)

// Set v, yParity and type
if test.v != "" {
Expand Down

0 comments on commit 6c9f702

Please sign in to comment.