Network
如何建立連接以在新創建的山寨幣上探勘測試網塊
我試圖複製一個山寨幣用於教育目的。我完全是新手,我有一些計劃來實施不同的 PoW 並繼續研究加密貨幣。
我遵循了Shakezula 的複製指南。
我遵循了指南中的所有步驟,但是我失去了要點:因此我無法連接機器開始挖礦。誰能解釋我做錯了什麼?我正在為此苦苦掙扎,我真的很期待理解。
我不明白的是 Shakezula 指南中關於埠轉發的要點:
旁注:因為我為此使用了 VPS,所以我真的不需要擔心埠轉發。在家用 PC 上,您需要將在剪切和粘貼部分中為 P2Pport 選擇的埠轉發到您正在使用的 PC。對於此範例,即埠 55884。
這是什麼意思?這是否意味著我應該在機器的 .conf 文件中添加這個埠?
我的情況:
- 我正在嘗試在兩台 VM 機器上連接已編譯的硬幣:帶 IP 的 VM1 和帶 IP的
192.168.122.121
VM2192.168.122.158
(它們能夠相互 ping 通)- 在我的 conf 文件中,我只放了 rpc 使用者名/密碼
- 在VM1上我做
./barcoin -testnet -connect=192.168.122.158 &
- 在VM2上我做
./barcoin -testnet -connect=192.168.122.121 &
在 .barcoin/testnet3/debug.log 我得到以下資訊:
ThreadSocketHandler started connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused Flushed 0 addresses to peers.dat 42ms trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused} trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
我將此埠 55884 添加到其中一台機器的 conf 文件中並得到相同的錯誤。
然後我將命令添加
connect=192.168.122.121:55884
到其中一個 conf 文件並開始獲取:trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
請幫我解決這個問題。非常感謝!
我很高興地說我找到了解決方案。這很簡單:
主PC,主節點,應該在監聽其他人,因此你需要添加一個命令:
listen=1
此外,我建議您也添加以下命令,但對於所有節點:
testnet=1 testnet_config=1
大家好運。