diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-06-06 21:50:23 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-06-06 21:50:23 +0800 |
commit | ed621aae333ac183acc29c396c708ae57301838a (patch) | |
tree | e9b01bc56f9a07cdf8451fc263c9fe5a3b16f0db | |
parent | d65b64c8846636d3e58c1857eaff149d2f82a283 (diff) | |
download | dexon-ed621aae333ac183acc29c396c708ae57301838a.tar dexon-ed621aae333ac183acc29c396c708ae57301838a.tar.gz dexon-ed621aae333ac183acc29c396c708ae57301838a.tar.bz2 dexon-ed621aae333ac183acc29c396c708ae57301838a.tar.lz dexon-ed621aae333ac183acc29c396c708ae57301838a.tar.xz dexon-ed621aae333ac183acc29c396c708ae57301838a.tar.zst dexon-ed621aae333ac183acc29c396c708ae57301838a.zip |
Cleanup
-rw-r--r-- | cmd/geth/chaincmd.go | 2 | ||||
-rw-r--r-- | core/chain_manager.go | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index 509356a90..2e90001af 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -69,7 +69,7 @@ func importChain(ctx *cli.Context) { } func exportChain(ctx *cli.Context) { - if len(ctx.Args()) != 1 { + if len(ctx.Args()) < 1 { utils.Fatalf("This command requires an argument.") } chain, _, _, _ := utils.MakeChain(ctx) diff --git a/core/chain_manager.go b/core/chain_manager.go index 1d1b6554e..ae25ff6b1 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -351,13 +351,12 @@ func (self *ChainManager) Export(w io.Writer) error { func (self *ChainManager) ExportN(w io.Writer, first uint64, last uint64) error { self.mu.RLock() defer self.mu.RUnlock() - glog.V(logger.Info).Infof("exporting %v blocks...\n", self.currentBlock.Header().Number) if first > last { return fmt.Errorf("export failed: first (%d) is greater than last (%d)", first, last) } - glog.V(logger.Info).Infof("exporting %d blocks...\n", last-first) + glog.V(logger.Info).Infof("exporting %d blocks...\n", last-first+1) for nr := first; nr <= last; nr++ { block := self.GetBlockByNumber(nr) |