aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-26 19:06:23 +0800
committerobscuren <geffobscura@gmail.com>2015-03-26 19:06:23 +0800
commit507830eb81affef5b69de380946e4ca6687efc1f (patch)
treef77470a81366c3ff5a1109c03aecdc67b42c1e04
parenteb433731aa535a47c4a828ea15eafabd37a8278b (diff)
parent7e1e264375fe4bebbf6bb40604d0060744ebae2a (diff)
downloaddexon-507830eb81affef5b69de380946e4ca6687efc1f.tar.gz
dexon-507830eb81affef5b69de380946e4ca6687efc1f.tar.zst
dexon-507830eb81affef5b69de380946e4ca6687efc1f.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
-rw-r--r--xeth/xeth.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 25fdb8c89..bf30fc2fc 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -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)
}