aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-05-16 22:11:19 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-05-16 22:11:19 -0400
commit928d3a011cc66c7f907c4d053f674ea77dc611cc (patch)
treef2e3f8b379328089349fb105d08b64b7cc8e1b18 /src/init.cpp
parent768e5d52fb295b000940f6a806c3d4bfc3e4f54d (diff)
CAddrDB: Replace BDB-managed addr.dat with internally managed peers.dat
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 9b12ab0aa4..2a3e407e86 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -371,9 +371,15 @@ bool AppInit2()
InitMessage(_("Loading addresses..."));
printf("Loading addresses...\n");
nStart = GetTimeMillis();
- if (!LoadAddresses())
- strErrors << _("Error loading addr.dat") << "\n";
- printf(" addresses %15"PRI64d"ms\n", GetTimeMillis() - nStart);
+
+ {
+ CAddrDB adb;
+ if (!adb.Read(addrman))
+ printf("Invalid or missing peers.dat; recreating\n");
+ }
+
+ printf("Loaded %i addresses from peers.dat %"PRI64d"ms\n",
+ addrman.size(), GetTimeMillis() - nStart);
InitMessage(_("Loading block index..."));
printf("Loading block index...\n");