Bitcoin Forum
June 15, 2024, 03:41:57 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: cpuminer requires at least two bitcoin nodes to run  (Read 123 times)
victorkimba17 (OP)
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
June 25, 2018, 07:18:26 AM
 #1

i download this cpuminer on a cusmotmised blockchain that has different genesis block. i notice it requires at least two bitcoin nodes to run.

Is it due to the consensus algo ?

this is the cpuminer link  https://github.com/pooler/cpuminer
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3430
Merit: 6704


Just writing some code


View Profile WWW
June 25, 2018, 07:38:03 AM
Merited by Foxpup (2)
 #2

No, that is unrelated to the consensus algorithm. It is simply part of how the getblocktemplate RPC command works. It must be connected to the network before you can use the RPC call (and thus mine). So you must have at least one connection to another node.

victorkimba17 (OP)
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
June 25, 2018, 07:57:56 AM
 #3

thanks for pointing out getblocktemplate.

In src/rpc/mining.cpp , i comment out these two lines:

Code:
   //if (g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0)
    //    throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Bitcoin is not connected!");

and run one node only.

and getblocktemplate can work. and also cpuminer can work. So it is not necessary to have at least two nodes for mining.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!