mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
Fix block height calculation
This commit is contained in:
parent
d0c3f127ee
commit
1f35c0f032
1 changed files with 1 additions and 1 deletions
|
|
@ -165,7 +165,7 @@ func (self *XEth) getBlockByHeight(height int64) *types.Block {
|
||||||
var num uint64
|
var num uint64
|
||||||
|
|
||||||
if height < 0 {
|
if height < 0 {
|
||||||
num = self.CurrentBlock().NumberU64() + uint64(-1*height)
|
num = self.CurrentBlock().NumberU64() + uint64(-1*(height+1))
|
||||||
} else {
|
} else {
|
||||||
num = uint64(height)
|
num = uint64(height)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue