Skip to content

Commit 8b62855

Browse files
committed
x
1 parent 2ff7866 commit 8b62855

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

api/api.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -1003,17 +1003,17 @@ func (api *Server) readState2(ctx context.Context, p protocol.Protocol, height s
10031003
return nil, uint64(0), errors.New("rolldpos is not registered")
10041004
}
10051005

1006-
tipEpochNum := rp.GetEpochNum(tipHeight)
1006+
//tipEpochNum := rp.GetEpochNum(tipHeight)
10071007
if height != "" {
10081008
inputHeight, err := strconv.ParseUint(height, 0, 64)
10091009
if err != nil {
10101010
return nil, uint64(0), err
10111011
}
1012-
inputEpochNum := rp.GetEpochNum(inputHeight)
1013-
if inputEpochNum < tipEpochNum {
1014-
// old data, wrap to history state reader
1015-
return p.ReadState(ctx, factory.NewHistoryStateReader(api.sf, inputHeight), methodName, arguments...)
1016-
}
1012+
//inputEpochNum := rp.GetEpochNum(inputHeight)
1013+
//if inputEpochNum < tipEpochNum {
1014+
// old data, wrap to history state reader
1015+
return p.ReadState(ctx, factory.NewHistoryStateReader(api.sf, inputHeight), methodName, arguments...)
1016+
//}
10171017
}
10181018

10191019
// TODO: need to distinguish user error and system error

0 commit comments

Comments
 (0)