aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-09-21 20:36:29 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-10-19 15:03:09 +0800
commitc33cc382b3561ca91871111933f81653bfd8532f (patch)
tree0749dd4e4ebd66efe1272ee984e4dda06b4462be /rpc
parent92f9a3e5fa29e0f05c81b348b87cab4f7a94f0c8 (diff)
downloaddexon-c33cc382b3561ca91871111933f81653bfd8532f.tar.gz
dexon-c33cc382b3561ca91871111933f81653bfd8532f.tar.zst
dexon-c33cc382b3561ca91871111933f81653bfd8532f.zip
core: support inserting pure header chains
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api/debug.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/rpc/api/debug.go b/rpc/api/debug.go
index 003b4d994..d2cbc7f19 100644
--- a/rpc/api/debug.go
+++ b/rpc/api/debug.go
@@ -146,13 +146,7 @@ func (self *debugApi) SetHead(req *shared.Request) (interface{}, error) {
if err := self.codec.Decode(req.Params, &args); err != nil {
return nil, shared.NewDecodeParamError(err.Error())
}
-
- block := self.xeth.EthBlockByNumber(args.BlockNumber)
- if block == nil {
- return nil, fmt.Errorf("block #%d not found", args.BlockNumber)
- }
-
- self.ethereum.BlockChain().SetHead(block)
+ self.ethereum.BlockChain().SetHead(uint64(args.BlockNumber))
return nil, nil
}