From ec23c22557448f5fd113372ef2b300831f4f6f9a Mon Sep 17 00:00:00 2001 From: yajianggroup Date: Thu, 9 Oct 2025 18:25:11 +0800 Subject: [PATCH] refactor: use reflect.TypeFor Signed-off-by: yajianggroup --- ethstorage/archiver/blob.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethstorage/archiver/blob.go b/ethstorage/archiver/blob.go index 0e6d056e..d7e00fc3 100644 --- a/ethstorage/archiver/blob.go +++ b/ethstorage/archiver/blob.go @@ -61,7 +61,7 @@ func (b byte48) MarshalJSON() ([]byte, error) { } func (b *byte48) UnmarshalJSON(data []byte) error { - return hexutil.UnmarshalFixedJSON(reflect.TypeOf(b), data, b[:]) + return hexutil.UnmarshalFixedJSON(reflect.TypeFor[*byte48](), data, b[:]) } type blobContent [blobs.BlobLength]byte @@ -71,5 +71,5 @@ func (b blobContent) MarshalJSON() ([]byte, error) { } func (b *blobContent) UnmarshalJSON(data []byte) error { - return hexutil.UnmarshalFixedJSON(reflect.TypeOf(b), data, b[:]) + return hexutil.UnmarshalFixedJSON(reflect.TypeFor[*blobContent](), data, b[:]) }