aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/seeds/README9
-rwxr-xr-xcontrib/seeds/makeseeds.py32
-rw-r--r--src/main.cpp9
-rw-r--r--src/main.h2
4 files changed, 42 insertions, 10 deletions
diff --git a/contrib/seeds/README b/contrib/seeds/README
new file mode 100644
index 0000000000..97e3e1ec71
--- /dev/null
+++ b/contrib/seeds/README
@@ -0,0 +1,9 @@
+Utility to generate the pnSeed[] array that is compiled into the client
+(see src/net.cpp).
+
+The 600 seeds compiled into the 0.8 release were created from sipa's DNS seed data, like this:
+
+curl -s http://bitcoin.sipa.be/seeds.txt | head -1000 | makeseeds.py
+
+The input to makeseeds.py is assumed to be approximately sorted from most-reliable to least-reliable,
+with IP:port first on each line (lines that don't match IPv4:port are ignored).
diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py
new file mode 100755
index 0000000000..1d01fd7d20
--- /dev/null
+++ b/contrib/seeds/makeseeds.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+#
+# Generate pnSeed[] from Pieter's DNS seeder
+#
+
+NSEEDS=600
+
+import re
+import sys
+from subprocess import check_output
+
+def main():
+ lines = sys.stdin.readlines()
+
+ ips = []
+ pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):8333")
+ for line in lines:
+ m = pattern.match(line)
+ if m is None:
+ continue
+ ip = 0
+ for i in range(0,4):
+ ip = ip + (int(m.group(i+1)) << (8*(i)))
+ if ip == 0:
+ continue
+ ips.append(ip)
+
+ for row in range(0, min(NSEEDS,len(ips)), 8):
+ print " " + ", ".join([ "0x%08x"%i for i in ips[row:row+8] ]) + ","
+
+if __name__ == '__main__':
+ main()
diff --git a/src/main.cpp b/src/main.cpp
index 412f4d7a07..847b1ea8a6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -93,15 +93,6 @@ void UnregisterWallet(CWallet* pwalletIn)
}
}
-// check whether the passed transaction is from us
-bool static IsFromMe(CTransaction& tx)
-{
- BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered)
- if (pwallet->IsFromMe(tx))
- return true;
- return false;
-}
-
// get the wallet transaction with the given hash (if it exists)
bool static GetTransaction(const uint256& hashTx, CWalletTx& wtx)
{
diff --git a/src/main.h b/src/main.h
index 8498fc2edd..23a4d3ba31 100644
--- a/src/main.h
+++ b/src/main.h
@@ -106,7 +106,7 @@ static const uint64 nMinDiskSpace = 52428800;
class CReserveKey;
class CCoinsDB;
class CBlockTreeDB;
-class CDiskBlockPos;
+struct CDiskBlockPos;
class CCoins;
class CTxUndo;
class CCoinsView;