This commit is contained in:
ericxtheodore 2025-07-29 20:26:29 +08:00 committed by GitHub
parent 0029554f8c
commit c608c9be4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,10 +77,7 @@ func (t transientStorage) PrettyPrint() string {
for _, addr := range sortedAddrs {
fmt.Fprintf(out, "%#x:", addr)
storage := t[addr]
sortedKeys := make([]common.Hash, 0, len(storage))
for key := range storage {
sortedKeys = append(sortedKeys, key)
}
sortedKeys := slices.Collect(maps.Keys(storage))
slices.SortFunc(sortedKeys, common.Hash.Cmp)
for _, key := range sortedKeys {
fmt.Fprintf(out, " %X : %X\n", key, storage[key])