core/types: using maps.Clone (#29398)
This commit is contained in:
parent
c39d00e316
commit
6c9f702982
|
@ -22,6 +22,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"maps"
|
||||||
"math/big"
|
"math/big"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -515,10 +516,7 @@ func TestYParityJSONUnmarshalling(t *testing.T) {
|
||||||
test := test
|
test := test
|
||||||
t.Run(fmt.Sprintf("txType=%d: %s", txType, test.name), func(t *testing.T) {
|
t.Run(fmt.Sprintf("txType=%d: %s", txType, test.name), func(t *testing.T) {
|
||||||
// Copy the base json
|
// Copy the base json
|
||||||
testJson := make(map[string]interface{})
|
testJson := maps.Clone(baseJson)
|
||||||
for k, v := range baseJson {
|
|
||||||
testJson[k] = v
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set v, yParity and type
|
// Set v, yParity and type
|
||||||
if test.v != "" {
|
if test.v != "" {
|
||||||
|
|
Loading…
Reference in New Issue