mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
cm/geth: set dropFn for copydb, fixes #18525
This commit is contained in:
parent
c57166caa3
commit
f14c3f0aef
1 changed files with 3 additions and 1 deletions
|
|
@ -372,7 +372,9 @@ func copyDb(ctx *cli.Context) error {
|
|||
chain, chainDb := utils.MakeChain(ctx, stack)
|
||||
|
||||
syncmode := *utils.GlobalTextMarshaler(ctx, utils.SyncModeFlag.Name).(*downloader.SyncMode)
|
||||
dl := downloader.New(syncmode, chainDb, new(event.TypeMux), chain, nil, nil)
|
||||
// Set a non-nil dropfunction to prevent panic
|
||||
dropFn := func(id string) {}
|
||||
dl := downloader.New(syncmode, chainDb, new(event.TypeMux), chain, nil, dropFn)
|
||||
|
||||
// Create a source peer to satisfy downloader requests from
|
||||
db, err := ethdb.NewLDBDatabase(ctx.Args().First(), ctx.GlobalInt(utils.CacheFlag.Name), 256)
|
||||
|
|
|
|||
Loading…
Reference in a new issue