-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: bitcoin#16807, #21825, #22257, #23577, #24259, #24420, #24339, #24441, #24735, #25125, #25171 #7492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4844fa4
79a32d0
4a0b67e
a802b97
da7dbee
3bec763
5e7dff5
2a9eb53
fec8636
42ae4ce
1f1bacd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |||||||||
| <ip>:<port> | ||||||||||
| [<ipv6>]:<port> | ||||||||||
| <onion>.onion:<port> | ||||||||||
| <i2p>.b32.i2p:<port> | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Document the I2P port restriction.
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| The output will be two data structures with the peers in binary format: | ||||||||||
|
|
||||||||||
|
|
@@ -52,6 +53,12 @@ def name_to_bip155(addr): | |||||||||
| return (BIP155Network.TORV2, vchAddr) | ||||||||||
| else: | ||||||||||
| raise ValueError('Invalid onion %s' % vchAddr) | ||||||||||
| elif addr.endswith('.b32.i2p'): | ||||||||||
| vchAddr = b32decode(addr[0:-8] + '====', True) | ||||||||||
|
Comment on lines
+56
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Match the core parser’s case-insensitive suffix handling. This rejects valid addresses such as Proposed fix- elif addr.endswith('.b32.i2p'):
+ elif addr.lower().endswith('.b32.i2p'):📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| if len(vchAddr) == 32: | ||||||||||
| return (BIP155Network.I2P, vchAddr) | ||||||||||
| else: | ||||||||||
| raise ValueError(f'Invalid I2P {vchAddr}') | ||||||||||
| elif '.' in addr: # IPv4 | ||||||||||
| return (BIP155Network.IPV4, bytes((int(x) for x in addr.split('.')))) | ||||||||||
| elif ':' in addr: # IPv6 or CJDNS | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Updated RPCs | ||
| ------------ | ||
|
|
||
| - The `validateaddress` RPC now returns an `error_locations` array for invalid | ||
| addresses, with the indices of invalid character locations in the address (if | ||
| known). For example, this will attempt to locate up to two Bech32 errors, and | ||
| return their locations if successful. Success and correctness are only guaranteed | ||
| if fewer than two substitution errors have been made. | ||
| The error message returned in the `error` field now also returns more specific | ||
| errors when decoding fails. |
Uh oh!
There was an error while loading. Please reload this page.