mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-30 06:42:57 +00:00
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
This commit is contained in:
commit
507830eb81
1 changed files with 2 additions and 6 deletions
|
|
@ -144,12 +144,8 @@ func (self *XEth) Whisper() *Whisper { return self.whisper }
|
|||
func (self *XEth) getBlockByHeight(height int64) *types.Block {
|
||||
var num uint64
|
||||
|
||||
// -1 means "latest"
|
||||
// -2 means "pending", which has no blocknum
|
||||
if height <= -2 {
|
||||
return &types.Block{}
|
||||
} else if height == -1 {
|
||||
num = self.CurrentBlock().NumberU64()
|
||||
if height < 0 {
|
||||
num = self.CurrentBlock().NumberU64() + uint64(-1*height)
|
||||
} else {
|
||||
num = uint64(height)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue