core/types: using maps.Clone (#29398)

pull/29422/head
cui 7 months ago committed by GitHub
parent c39d00e316
commit 6c9f702982
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      core/types/transaction_test.go

@ -22,6 +22,7 @@ import (
"encoding/json"
"errors"
"fmt"
"maps"
"math/big"
"reflect"
"testing"
@ -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 != "" {

Loading…
Cancel
Save