From 1f35c0f03265fbb1b1231320a7e00fd00e030f4f Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Tue, 7 Apr 2015 08:05:44 -0500 Subject: [PATCH] Fix block height calculation --- xeth/xeth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xeth/xeth.go b/xeth/xeth.go index 825f26017c..77bf5b463b 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -165,7 +165,7 @@ func (self *XEth) getBlockByHeight(height int64) *types.Block { var num uint64 if height < 0 { - num = self.CurrentBlock().NumberU64() + uint64(-1*height) + num = self.CurrentBlock().NumberU64() + uint64(-1*(height+1)) } else { num = uint64(height) }