鍍金池/ 問(wèn)答/C++  Linux  HTML/ 用minerd連接btcpool的測(cè)試程序simulator時(shí)報(bào)錯(cuò):JSON-R

用minerd連接btcpool的測(cè)試程序simulator時(shí)報(bào)錯(cuò):JSON-RPC call failed.

本地ubuntu16.04編譯btcpool源碼,完成之后,運(yùn)行其測(cè)試程序simulator時(shí)出錯(cuò)

1.先運(yùn)行sserver程序

cd /work/btcpool/build/run_sserver
./sserver -c sserver.cfg -l log_sserver/

2.運(yùn)行simulator

cd /work/btcpool/build/run_simulator
./simulator -c simulator.cfg -l log_simulator/

3.模擬礦機(jī)連接, 出錯(cuò):

minerd -o stratum+tcp://127.0.0.1:3333 -O aaa:1

[2018-04-04 15:17:06] Binding thread 0 to cpu 0
[2018-04-04 15:17:06] Binding thread 1 to cpu 1
[2018-04-04 15:17:06] Starting Stratum on stratum+tcp://127.0.0.1:3333
[2018-04-04 15:17:06] 4 miner threads started, using 'scrypt' algorithm.
[2018-04-04 15:17:06] Binding thread 2 to cpu 2
[2018-04-04 15:17:06] Binding thread 3 to cpu 3
[2018-04-04 15:17:07] JSON-RPC call failed: [
   27,
   "Illegal params",
   null
]
[2018-04-04 15:17:07] ...retry after 30 seconds

這里的json-RPC出錯(cuò),是不是因?yàn)檫€有其他依賴(lài)的服務(wù)沒(méi)有啟動(dòng)?是什么服務(wù)?


sserver的日志如下

root@zc-x0:/work/btcpool/build# tail -f run_sserver/log_sserver/sserver.INFO 
I0408 09:35:59.537277  9953 StratumSession.cc:246] client connect, ip: 127.0.0.1
I0408 09:35:59.538455  9953 StratumServer.cc:1136] socket closed
I0408 09:36:29.539168  9953 StratumSession.cc:246] client connect, ip: 127.0.0.1
I0408 09:36:29.540217  9953 StratumServer.cc:1136] socket closed
I0408 09:36:59.540978  9953 StratumSession.cc:246] client connect, ip: 127.0.0.1
I0408 09:36:59.542340  9953 StratumServer.cc:1136] socket closed
I0408 09:37:29.543114  9953 StratumSession.cc:246] client connect, ip: 127.0.0.1
I0408 09:37:29.544587  9953 StratumServer.cc:1136] socket closed

simulator日志如下

root@zc-x0:/work/btcpool/build# tail -f run_simulator/log_simulator/simulator.INFO 
E0408 09:07:11.401319 25623 StratumClient.cc:144] json result is null, err: 1
E0408 09:07:11.652422 25623 StratumClient.cc:144] json result is null, err: 1
E0408 09:07:11.652513 25623 StratumClient.cc:144] json result is null, err: 1
E0408 09:07:11.652572 25623 StratumClient.cc:144] json result is null, err: 1
E0408 09:07:11.652631 25623 StratumClient.cc:144] json result is null, err: 1
E0408 09:07:11.652688 25623 StratumClient.cc:144] json result is null, err: 1
回答
編輯回答
巷尾

運(yùn)行前,需要配置bitcoin.conf,將其放在/.bitcoin/下面

2018年1月1日 09:08