- 8FAEDDC8CA1B84E53EDEE8F3325EDD7DB8B74E063F4D338AE7E280C02DCE96E8156157A6802FEAB5B7F695981E6F8A42AB5F44B9DF3093A4D7C4F30F9B029912
+ 35EFFBC7F73CDBDA92148BE58171B2337C090A7997EB3B02DAF9A88287B4315C80D7FA5EDF403BE9CF958969C0C7E0C1B578C10F146EE0EA9B2965A1F97971BF
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()