以太坊(9)go-ethereum + mist 开发环境搭建 --mac - Go语言中文社区

以太坊(9)go-ethereum + mist 开发环境搭建 --mac


本章目的:

    通过go-ethereum源码搭建本地私有链、同mist连接进行用户转账;

准备工作:

    1. 安装mist客户端: https://github.com/ethereum/mist/releases/

    2. 部署go-ethereum:

        官网地址:https://ethereum.github.io/go-ethereum/install/#build-it-from-source-code    

            git clone https://github.com/ethereum/go-ethereum.git

         cd go-ethereum

         make geth



    3. 启动私有链前面文章有具体的操作步骤不在赘述

       

    ./build/bin/geth --datadir /Users/xiliangMa/work/privatechain/chain/ --identity testGeth1 --rpc --rpcport 8090 --port 30303 

    --rpccorsdomain "*" --networkid 1138 console



4. 启动mist连接私有链

  /Applications/Mist.app/Contents/MacOS/Mist --rpc /Users/xiliangMa/work/privatechain/chain/geth.ipc 

    我的私有链是之前写文章时搭建的,所以里面有三个账户。



转账:

    从xiliangMa 账户转给 ACCOUNT3 5个以太币,点击发送;

    

此时你能看到交易还未被确认,因为是私有链要自己开启挖矿;



开启挖矿: miner.start()




本章结束,下章见。

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_41806245/article/details/80472300
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-05-07 22:25:36
  • 阅读 ( 1802 )
  • 分类:区块链

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢