Wait until we have more than a single addr response

This commit is contained in:
Pieter Wuille 2016-05-31 22:06:58 +02:00
parent c36ed80739
commit a9e960a4dd

View file

@ -136,7 +136,9 @@ class CNode {
// printf("%s: got %i addresses\n", ToString(you).c_str(), (int)vAddrNew.size()); // printf("%s: got %i addresses\n", ToString(you).c_str(), (int)vAddrNew.size());
int64 now = time(NULL); int64 now = time(NULL);
vector<CAddress>::iterator it = vAddrNew.begin(); vector<CAddress>::iterator it = vAddrNew.begin();
if (vAddrNew.size() > 1) {
if (doneAfter == 0 || doneAfter > now + 1) doneAfter = now + 1; if (doneAfter == 0 || doneAfter > now + 1) doneAfter = now + 1;
}
while (it != vAddrNew.end()) { while (it != vAddrNew.end()) {
CAddress &addr = *it; CAddress &addr = *it;
// printf("%s: got address %s\n", ToString(you).c_str(), addr.ToString().c_str(), (int)(vAddr->size())); // printf("%s: got address %s\n", ToString(you).c_str(), addr.ToString().c_str(), (int)(vAddr->size()));