unit test fix for eth_getStorageAt

This commit is contained in:
ramil
2021-04-21 22:42:11 +03:00
parent c62799fdd6
commit 1141f3909c
2 changed files with 11 additions and 7 deletions
+4
View File
@@ -22,6 +22,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io"
"math"
"math/big"
"time"
@@ -662,6 +663,9 @@ func (pea *PublicEthAPI) GetStorageAt(ctx context.Context, address common.Addres
if storageVal != nil && err == nil {
var value common.Hash
_, content, _, err := rlp.Split(storageVal)
if err == io.ErrUnexpectedEOF {
return hexutil.Bytes{}, nil
}
if err != nil {
return nil, err
}