Skip to content

Commit c4e0201

Browse files
committed
x
1 parent 95e25c0 commit c4e0201

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/api.go

+4
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,10 @@ func (api *Server) ReadState2(ctx context.Context, in *iotexapi.ReadStateRequest
497497
if err != nil {
498498
return nil, status.Error(codes.NotFound, err.Error())
499499
}
500+
rsh := fmt.Sprintf("%d", readStateHeight)
501+
if rsh != in.GetHeight() {
502+
return nil, status.Error(codes.NotFound, err.Error())
503+
}
500504
blkHash, err := api.dao.GetBlockHash(readStateHeight)
501505
if err != nil {
502506
if errors.Cause(err) == db.ErrNotExist {

0 commit comments

Comments
 (0)