<p>the seed nodes are generated in contrib/seeds</p>

<p>curl -s <a href="http://bitcoin.sipa.be/seeds.txt" rel="nofollow noreferrer">http://bitcoin.sipa.be/seeds.txt</a> > seeds_main.txt
    python makeseeds.py &lt; seeds_main.txt > nodes_main.txt
    python generate-seeds.py . > ../../src/chainparamsseeds.h</p>

<p>just edit seed.main.txt</p>

CC BY-SA 3.0
2018-04-01T18:30:46.797Z
2018-04-01T18:30:46.797Z
Michael Wise
<p>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 </p>

CC BY-SA 3.0
2016-04-07T09:46:00.500Z
2016-04-07T09:46:00.500Z
visweshn92
<p>There are a few ways to do it, I personally went into <code>src/net.cpp</code> and commented out the <code>if</code> condition that triggers the lookup starting at line 1266.</p>

<pre><code>// if (addrman.size() == 0 &amp;&amp; (GetTime() - nStart &gt; 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;
//     }
// }
</code></pre>

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

CC BY-SA 3.0
2016-04-07T09:15:10.820Z
2016-04-08T10:31:51.590Z
2016-04-08T10:31:51.590Z
derrend
<p>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 <code>connect</code> to turn off this behaviour but I don't want to have to include that in my <code>bitcoin.conf</code> file.
I am using Bitcoin v0.10.</p>

<p>Any hints greatly appreciated :)</p>

CC BY-SA 3.0
2016-04-07T06:00:21.870Z
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
CC BY-SA 3.0
2016-04-07T06:14:50.957Z
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
CC BY-SA 3.0
2016-04-07T06:37:50.020Z
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
CC BY-SA 3.0
2016-04-07T06:58:50.343Z
I appreciate the help, i have already done that though - https://github.com/derrend/bitcointemplate/blob/master/src/chainparams.cpp
Im looking at `src/chainparamsseed.h` and `share/seeds/`, I think these may be what I am looking for.
derrend
CC BY-SA 3.0
2016-04-07T07:09:30.963Z
Please paste the error. I can help u
visweshn92
CC BY-SA 3.0
2016-04-07T07:19:32.293Z
Thank you viesweshn92 but the mods i made to `src/chainparamsseeds` have fixed my problem, I will supply a more detailed answer below later. Thanks again :)
derrend
CC BY-SA 3.0
2016-04-07T09:24:33.847Z
Awesome then! Kindly upvote my answer/comment ;)
visweshn92
<blockchain><blockchain-fork><private-blockchains>
How do I remove hard coded seeds from the bitcoin source code?
derrend
# How do I remove hard coded seeds from the bitcoin source code?

(Asked by: username_0 on 2016-04-07)

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 :)

**Tags:** blockchain, blockchain-fork, private-blockchains

> **Comments:**
> **username_1**: 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  
> **username_0**: 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.  
> **username_1**: 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  
> **username_0**: I appreciate the help, i have already done that though - https://github.com/username_0/bitcointemplate/blob/master/src/chainparams.cpp Im looking at `src/chainparamsseed.h` and `share/seeds/`, I think these may be what I am looking for.  
> **username_1**: Please paste the error. I can help u  
> **username_0**: Thank you viesweshn92 but the mods i made to `src/chainparamsseeds` have fixed my problem, I will supply a more detailed answer below later. Thanks again :)  
> **username_1**: Awesome then! Kindly upvote my answer/comment ;)  

---

## 3 answers

### Answer by username_0 on 2016-04-07. Score: 3 | Accepted answer

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


---

### Answer by username_2 on 2018-04-01. Score: 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


---

### Answer by username_1 on 2016-04-07. Score: 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


---

