diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2012-05-17 08:46:33 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@exmulti.com> | 2012-05-17 08:46:33 -0700 |
commit | b56843b25356784d6806b2cdd6506bfb2e066445 (patch) | |
tree | f2e3f8b379328089349fb105d08b64b7cc8e1b18 /src/init.cpp | |
parent | 49232d1abf96f85f785e0ee95fbb79d0338855bc (diff) | |
parent | 928d3a011cc66c7f907c4d053f674ea77dc611cc (diff) |
Merge pull request #1198 from jgarzik/addrman
Replace BDB-managed addr.dat with bitcoin-managed peers.dat
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 12 |
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"); |