We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c48e788 commit d355a30Copy full SHA for d355a30
src/netaddress.cpp
@@ -255,10 +255,14 @@ bool CNetAddr::SetSpecial(const std::string& str)
255
Span<const uint8_t> input_checksum{input.data() + ADDR_TORV3_SIZE, torv3::CHECKSUM_LEN};
256
Span<const uint8_t> input_version{input.data() + ADDR_TORV3_SIZE + torv3::CHECKSUM_LEN, sizeof(torv3::VERSION)};
257
258
+ if (input_version != torv3::VERSION) {
259
+ return false;
260
+ }
261
+
262
uint8_t calculated_checksum[torv3::CHECKSUM_LEN];
263
torv3::Checksum(input_pubkey, calculated_checksum);
264
- if (input_checksum != calculated_checksum || input_version != torv3::VERSION) {
265
+ if (input_checksum != calculated_checksum) {
266
return false;
267
}
268
0 commit comments