0

I'm experimenting with blockchains at home and in my debug logs are lots of errors showing that my nodes are trying to get addresses from the hard coded seed nodes, I know I can use connect to turn off this behaviour but I don't want to have to include that in my bitcoin.conf file. I am using Bitcoin v0.10.

Any hints greatly appreciated :)

  • If u wanna turn off the hard-coded seeds (or DNS) AND also not give explicitly the topology you wish to connect, how will u even do any p2p communication? U will need to connect to peers in some way right – visweshn92 Apr 7 '16 at 6:00
  • I intend to add them manually in the config file with addnode but I keep getting annoying connection errors in my debug log. I just want to turn off the feature that tries to connect to the hard coded seeds. – derrend Apr 7 '16 at 6:14
  • There is a seed vector (for TestNet or Regtest) of hard-coded seeds that gets populated in the source code (vFixedSeeds in src/chainparams.cpp i guess?). U can either comment out them or simply clear the vector to empty it. Then u can explicitly have your topology – visweshn92 Apr 7 '16 at 6:37
  • I appreciate the help, i have already done that though - github.com/derrend/bitcointemplate/blob/master/src/… Im looking at src/chainparamsseed.h and share/seeds/, I think these may be what I am looking for. – derrend Apr 7 '16 at 6:58
  • Please paste the error. I can help u – visweshn92 Apr 7 '16 at 7:09
2

There are a few ways to do it, I personally went into src/net.cpp and commented out the if condition that triggers the lookup starting at line 1266.

// if (addrman.size() == 0 && (GetTime() - nStart > 60)) {
//     static bool done = false;
//     if (!done) {
//         LogPrintf("Adding fixed seed nodes as DNS doesn't seem to be available.\n");
//         addrman.Add(Params().FixedSeeds(), CNetAddr("127.0.0.1"));
//         done = true;
//     }
// }

Another effective fix was to remove all the encoded seed nodes from the two arrays located in src/chainparamsseeds.cpp

0

There is a seed vector (for TestNet or Regtest) of hard-coded seeds that gets populated in the source code (vFixedSeeds in src/chainparams.cpp i guess?). U can either comment out them or simply clear the vector to empty it. Then u can explicitly have your topology

0

the seed nodes are generated in contrib/seeds

curl -s http://bitcoin.sipa.be/seeds.txt > seeds_main.txt python makeseeds.py < seeds_main.txt > nodes_main.txt python generate-seeds.py . > ../../src/chainparamsseeds.h

just edit seed.main.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.