Fix block height calculation

This commit is contained in:
Taylor Gerring 2015-04-07 08:05:44 -05:00
parent d0c3f127ee
commit 1f35c0f032

View file

@ -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)
}