达世币全节点


门罗币全节点搭建

<h3>环境</h3> <p>NodeJs</p> <h3>安装客户端</h3> <p>启动客户端命令:./monerod --detach (默认ip为127.0.0.1,端口:18081,同时也会占用18082,所以wallet rpc服务启动用18083)</p> <h3>同步全节点</h3> <h3>开发</h3> <pre><code>接口主要调用Daemon Rpc和Wallet Rpc中的方法,基本已经满足接口功能,调用rpc服务前需先启动monerod主程序和monero-wallet-rpc服务</code></pre> <pre><code>启动monero-wallet-rpc服务命令: (1)指定具体钱包 /root/monero_code/monero/build/release/bin/monero-wallet-rpc --wallet-file /root/wallet_file/filename --password 951224ydq --rpc-bind-port 18083 --disable-rpc-login (2)不指定具体钱包,只启动服务 /root/monero_code/monero/build/release/bin/monero-wallet-rpc --rpc-bind-port 18083 --disable-rpc-login --wallet-dir /root/wallet_file</code></pre> <pre><code>接口开发思路:因涉及到查询钱包信息的接口调用都需要开启rpc服务,若切换钱包即调用导入私钥接口时需要切换服务,先关掉上一个钱包的rpc服务,再启动需要操作的钱包服务,现在钱包文件都存储在/root/wallet_file,值得注意的是发起交易时,若没有使用该钱包文件开启rpc服务或者发起交易时使用了该钱包文件,但还没有得到完全确认就关闭了服务,则交易信息会缺失from或者to的地址信息,且没有办法恢复。 monero-wallet-cli为钱包主程序,启动命令:/root/monero_code/monero/build/release/bin/monero-wallet-cli --wallet-file /root/wallet_file/test-wallet --password 951224ydq,启动之后会自动开始同步区块,show_transfers可以查看交易记录,有时会出现这边有记录,但是通过rpc服务get_transfers查的结果是{"id": "0","jsonrpc": "2.0","result": {}},即没有查到交易</code></pre> <p>详细内容可以查看https://getmonero.org/resources/developer-guides/wallet-rpc.html,<a href="https://getmonero.org/resources/developer-guides/daemon-rpc.html">https://getmonero.org/resources/developer-guides/daemon-rpc.html</a></p> <h4>代码</h4> <pre><code> 接口代码:/root/monero_code_monero/,可执行文件在/root/monero_code_monero/build/release/bin 源码:/root/api_monero-nodejs-libwallet``` #### 区块数据 /root/.bitmonero/</code></pre>

页面列表

ITEM_HTML