以太坊(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()




本章结束,下章见。

猜你喜欢

转载自blog.csdn.net/weixin_41806245/article/details/80472300
今日推荐