diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index b570a00fcfdb75bea5567fdb49f5859eaf84430c..b966ef584d17762bcfdbbb56356c03be33bf7242 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -291,13 +291,17 @@ func importChain(ctx *cli.Context) error { // Import the chain start := time.Now() + var importErr error + if len(ctx.Args()) == 1 { if err := utils.ImportChain(chain, ctx.Args().First()); err != nil { + importErr = err log.Error("Import error", "err", err) } } else { for _, arg := range ctx.Args() { if err := utils.ImportChain(chain, arg); err != nil { + importErr = err log.Error("Import error", "file", arg, "err", err) } } @@ -305,6 +309,12 @@ func importChain(ctx *cli.Context) error { chain.Stop() fmt.Printf("Import done in %v.\n\n", time.Since(start)) + ioStats, err := db.Stat("leveldb.iostats") + if err != nil { + utils.Fatalf("Failed to read database iostats: %v", err) + } + fmt.Println(ioStats) + // Print the memory statistics used by the importing mem := new(runtime.MemStats) runtime.ReadMemStats(mem) @@ -314,7 +324,7 @@ func importChain(ctx *cli.Context) error { fmt.Printf("Allocations: %.3f million\n", float64(mem.Mallocs)/1000000) fmt.Printf("GC pause: %v\n\n", time.Duration(mem.PauseTotalNs)) - return nil + return importErr } func exportChain(ctx *cli.Context) error { diff --git a/to-merge.txt b/to-merge.txt index a6a9e8f8f79f383ba9d8d807470563581e42eb01..5126b558a73d8bca0422081baf6fe15168d022a8 100644 --- a/to-merge.txt +++ b/to-merge.txt @@ -799,95 +799,3 @@ Date: Wed Jun 24 15:01:58 2020 -0500 if the err is non nil. Signed-off-by: meows <b5c6@protonmail.com> - -commit 0c82928981028e8b32b5852c38b095d2e0d26b04 -Author: Marius van der Wijden <m.vanderwijden@live.de> -Date: Wed Jun 24 19:58:28 2020 +0000 - - core/vm: fix incorrect computation of BLS discount (#21253) - - * core/vm: fix incorrect computation of discount - - During testing on Yolov1 we found that the way geth calculates the discount - is not in line with the specification. Basically what we did is calculate - 128 * Bls12381GXMulGas * discount / 1000 whenever we received more than 128 pairs - of values. Correct would be to calculate k * Bls12381... for k > 128. - - * core/vm: better logic for discount calculation - - * core/vm: better calculation logic, added worstcase benchmarks - - * core/vm: better benchmarking logic - -commit b482423e61e1e40ee4170139f24435fd57012333 -Author: Marius van der Wijden <m.vanderwijden@live.de> -Date: Wed Jun 24 19:56:27 2020 +0000 - - trie: reduce allocs in insertPreimage (#21261) - -commit 93142e50c3d4ced88ca1620b4cee2038c4c145ba -Author: Gary Rong <garyrong0905@gmail.com> -Date: Wed Jun 24 18:54:13 2020 +0800 - - eth: don't block if transaction broadcast loop fails (#21255) - - * eth: don't block if transaction broadcast loop is returned - - * eth: kick out peer if we failed to send message - - * eth: address comment - -commit 23f1a0b783b351cc185dd46fd5f9992c74801469 -Author: Felix Lange <fjl@twurst.com> -Date: Wed Jun 24 12:51:32 2020 +0200 - - crypto/secp256k1: enable 128-bit int code and endomorphism optimization (#21203) - - * crypto/secp256k1: enable use of __int128 - - This speeds up scalar & field calculations a lot. - - * crypto/secp256k1: enable endomorphism optimization - -commit da180ba097e9ac5bc53b8868b76191cbfeeb6a51 -Author: Felix Lange <fjl@twurst.com> -Date: Wed Jun 24 10:41:53 2020 +0200 - - cmd/devp2p: add commands for node key management (#21202) - - These commands mirror the key/URL generation functions of cmd/bootnode. - - $ devp2p key generate mynode.key - $ devp2p key to-enode mynode.key -ip 203.0.113.21 -tcp 30304 - enode://78a7746089baf4b8615f54a5f0b67b22b1... - -commit c42d1390d31cc580f0966e3681cd9cb89bfa83d9 -Merge: dce533c24 42ccb2fdb -Author: Péter Szilágyi <peterke@gmail.com> -Date: Wed Jun 24 09:44:23 2020 +0300 - - Merge pull request #21256 from karalabe/p2p-packet-metrics - - p2p: measure packet throughput too, not just bandwidth - -commit 42ccb2fdbda72b9ed9fa0fbb5594ee706fb8008c -Author: Péter Szilágyi <peterke@gmail.com> -Date: Wed Jun 24 09:36:20 2020 +0300 - - p2p: measure packet throughput too, not just bandwidth - -commit dce533c246fe6e6543f87e1de220a55be64d79fc -Author: ucwong <ucwong@126.com> -Date: Tue Jun 23 16:46:59 2020 +0800 - - whisper: fix time.sleep by time.ticker in whisper_test (#21251) - -commit 9a188c975dfae0b138a6553389f875a0c173f59f -Author: Guillaume Ballet <gballet@gmail.com> -Date: Fri Jun 19 15:43:52 2020 +0200 - - common/fdlimit: build on DragonflyBSD (#21241) - - * common/fdlimit: build on DragonflyBSD - - * review feedback