change history begin and end to int

Signed-off-by: xiehuc <xiehuc@gmail.com>