问题描述
阅读 https://geth.ethereum.org/docs/getting-started/dev-mode 上的文档时 它指出运行
geth --http --dev --datadir MyChain
Will 等等
-使用测试创世块初始化数据目录
但是在运行命令时我得到以下输出
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 ,当它在 datadir 中找不到时,geth 会创建一个新数据库
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
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)