首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将迷雾连接到测试网客户端?

如何将迷雾连接到测试网客户端?
EN

Ethereum用户
提问于 2016-01-27 17:46:18
回答 1查看 2K关注 0票数 3

我正在衰老试验网上运行一个geth实例。我使用以下命令启动它:

代码语言:javascript
复制
geth --testnet --networkid=2 --bootnodes=enode://b1217cbaa440e35ed471157123fe468e19e8b5ad5bedb4b1fdbcbdab6fb2f5ed3e95dd9c24a22a79fdb2352204cea207df27d92bfd21bfd41545e8b16f637499@104.44.138.37:30303 --genesis=/tmp/genesis.json --datadir=~/.ethereum-consensys-public-testnet

现在我试着在上面运行迷雾,但是它根本不能工作,因为它不能连接到geth IPC。

代码语言:javascript
复制
 $ mist
CONNECT to IPC PATH: /home/user/.ethereum/geth.ipc
NODECONNECTOR ERROR { [Error: connect ECONNREFUSED /home/user/.ethereum/geth.ipc]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '/home/user/.ethereum/geth.ipc' }
Node type:  geth
Network:  main

它试图连接到主网络IPC。我试了几个旗子在雾的命令,但它似乎没有认出他们。如何将迷雾连接到测试网客户端?

EN

回答 1

Ethereum用户

回答已采纳

发布于 2016-01-27 18:46:37

把你的电子钱包移到一个不同的位置(如果你已经有一个这样的钱包,以免弄坏你的生活物品),拿掉你的线路上的--数据,重新运行所有的东西,它应该能工作。虚空是用迷雾硬编码的。(暂时?)

https://github.com/ethereum/mist/blob/v0.3.8/modules/ipc/getIpcPath.js

代码语言:javascript
复制
module.exports = function() {
    var p = require('path');
    var path = global.path.HOME;

    if(process.platform === 'darwin')
        path += '/Library/Ethereum/geth.ipc';

    if(process.platform === 'freebsd' ||
       process.platform === 'linux' ||
       process.platform === 'sunos')
        path += '/.ethereum/geth.ipc';

    if(process.platform === 'win32')
        path = '\\\\.\\pipe\\geth.ipc';

    console.log('CONNECT to IPC PATH: '+ path);
    return path;
};

或者,您可以将.ipc文件放在Mist正在寻找的正确位置(从geth指定一个IPC文件,在geth目录中指定一个数据中心文件,在其他地方指定一个datadir文件),但对我来说,这似乎更复杂。

票数 4
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/716

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档