Ethereum Geth--dev--datadir未创建数据库

Ethereum Geth--dev--datadir未创建数据库,ethereum,go-ethereum,Ethereum,Go Ethereum,在网上阅读文档时 它说跑步 geth --http --dev --datadir MyChain 威尔 -使用测试块初始化数据目录 但是当运行该命令时,我得到以下输出 C:\bcbootcamp>geth --http --dev --datadir MyChain INFO [04-14|00:28:40.461] Starting Geth in ephemeral dev mode... INFO [04-14|00:28:40.537] Maximum peer count

在网上阅读文档时 它说跑步

geth --http --dev --datadir MyChain
威尔

-使用测试块初始化数据目录

但是当运行该命令时,我得到以下输出

C:\bcbootcamp>geth --http --dev --datadir MyChain
INFO [04-14|00:28:40.461] Starting Geth in ephemeral dev mode...
INFO [04-14|00:28:40.537] Maximum peer count                       ETH=50 LES=0 total=50
INFO [04-14|00:28:40.545] Set global gas cap                       cap=25000000
INFO [04-14|00:28:43.722] Using developer account                  address=0x953d79A4681068A8ab07De93b8EaE5dAedd81a7C
INFO [04-14|00:28:43.728] Allocated cache and file handles         database=C:\bcbootcamp\MyChain\geth\chaindata cache=512.00MiB handles=8192 readonly=true
Fatal: Could not open database: CreateFile C:\bcbootcamp\MyChain\geth\chaindata: The system cannot find the file specified.
测试显示,

geth init MyChain\genesis.json --datadir MyChain
geth--dev运行时没有问题

有没有一种方法可以像文档中描述的那样将--dev和--datadir一起使用,即geth在datadir中找不到数据库时创建一个新数据库

Geth
Version: 1.10.2-stable
Git Commit: 97d11b0187b4695ccf44e3b71b54155fe405a36f
Git Commit Date: 20210408
Architecture: amd64
Go Version: go1.16
Operating System: windows
GOPATH=
GOROOT=go