- E5274FE2FF8AA6840CE5BE2E7797766DC4A70A19C2E08954BBFD9CFFF4AD9E27614606079A4CE7FC5AE150DFAF2906BEE118B543D889710DA78475BD12F24C56
+ 071F23CB1E017F72A89271924861D1036E3FB2D9C6459709D8A962CD7AA94F84FAA657618D0DD553650A135A6E341ECF4389E2CB911C5E71D8C87D5D24BD77AF
bitcoin/src/protocol.cpp
(9 . 8)(9 . 8)
151
152
153 // Prototypes from net.h, but that header (currently) stinks, can't #include it without breaking things
154 bool Lookup(const char *pszName, std::vector<CAddress>& vaddr, int nServices, int nMaxSolutions, bool fAllowLookup = false, int portDefault = 0, bool fAllowPort = false);
155 bool Lookup(const char *pszName, CAddress& addr, int nServices, bool fAllowLookup = false, int portDefault = 0, bool fAllowPort = false);
156 bool Lookup(const char *pszName, std::vector<CAddress>& vaddr, int nServices, int nMaxSolutions, int portDefault = 0, bool fAllowPort = false);
157 bool Lookup(const char *pszName, CAddress& addr, int nServices, int portDefault = 0, bool fAllowPort = false);
158
159 static const unsigned char pchIPv4[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff };
160 static const char* ppszTypeName[] =
(96 . 28)(96 . 28)
162 nServices = nServicesIn;
163 }
164
165 CAddress::CAddress(const char* pszIn, int portIn, bool fNameLookup, uint64 nServicesIn)
166 CAddress::CAddress(const char* pszIn, int portIn, uint64 nServicesIn)
167 {
168 Init();
169 Lookup(pszIn, *this, nServicesIn, fNameLookup, portIn);
170 Lookup(pszIn, *this, nServicesIn, portIn);
171 }
172
173 CAddress::CAddress(const char* pszIn, bool fNameLookup, uint64 nServicesIn)
174 CAddress::CAddress(const char* pszIn, uint64 nServicesIn)
175 {
176 Init();
177 Lookup(pszIn, *this, nServicesIn, fNameLookup, 0, true);
178 Lookup(pszIn, *this, nServicesIn, 0, true);
179 }
180
181 CAddress::CAddress(std::string strIn, int portIn, bool fNameLookup, uint64 nServicesIn)
182 CAddress::CAddress(std::string strIn, int portIn, uint64 nServicesIn)
183 {
184 Init();
185 Lookup(strIn.c_str(), *this, nServicesIn, fNameLookup, portIn);
186 Lookup(strIn.c_str(), *this, nServicesIn, portIn);
187 }
188
189 CAddress::CAddress(std::string strIn, bool fNameLookup, uint64 nServicesIn)
190 CAddress::CAddress(std::string strIn, uint64 nServicesIn)
191 {
192 Init();
193 Lookup(strIn.c_str(), *this, nServicesIn, fNameLookup, 0, true);
194 Lookup(strIn.c_str(), *this, nServicesIn, 0, true);
195 }
196
197 void CAddress::Init()