-
Notifications
You must be signed in to change notification settings - Fork 1.2k
docs: clarify ProTx platform address RPC help #7375
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
base: develop
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -270,37 +270,38 @@ def test_validation_legacy(self): | |
| DEFAULT_PORT_PLATFORM_P2P, DEFAULT_PORT_PLATFORM_HTTP, | ||
| -8, f"Error setting coreP2PAddrs[1] to '127.0.0.2:{self.node_evo.mn.nodePort}' (too many entries)") | ||
|
|
||
| # platformP2PAddrs and platformHTTPSAddrs don't accept non-numeric inputs | ||
| # platformP2PAddrs and platformHTTPSAddrs don't accept non-numeric inputs; the rejection should | ||
| # also tell users that the "ADDR:PORT" / array form needs an Extended addresses (ExtNetInfo) ProTx. | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", f"127.0.0.1:{DEFAULT_PORT_PLATFORM_P2P}", DEFAULT_PORT_PLATFORM_HTTP, | ||
| -8, "Invalid param for platformP2PAddrs, ProTx version only supports ports") | ||
| -8, "this ProTx version only accepts a bare port number (e.g. 26656); the \"ADDR:PORT\" / address-array form requires an Extended addresses (ExtNetInfo) ProTx") | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", [f"127.0.0.1:{DEFAULT_PORT_PLATFORM_P2P}"], DEFAULT_PORT_PLATFORM_HTTP, | ||
| -8, "Invalid param for platformP2PAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformP2PAddrs, this ProTx version only accepts a bare port number") | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", DEFAULT_PORT_PLATFORM_P2P, f"127.0.0.1:{DEFAULT_PORT_PLATFORM_HTTP}", | ||
| -8, "Invalid param for platformHTTPSAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformHTTPSAddrs, this ProTx version only accepts a bare port number (e.g. 443); the \"ADDR:PORT\" / address-array form requires an Extended addresses (ExtNetInfo) ProTx") | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", DEFAULT_PORT_PLATFORM_P2P, [f"127.0.0.1:{DEFAULT_PORT_PLATFORM_HTTP}"], | ||
| -8, "Invalid param for platformHTTPSAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformHTTPSAddrs, this ProTx version only accepts a bare port number (e.g. 443); the \"ADDR:PORT\" / address-array form requires an Extended addresses (ExtNetInfo) ProTx") | ||
|
|
||
| # Port numbers may not be wrapped in arrays, either as integers or strings | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", [DEFAULT_PORT_PLATFORM_P2P], DEFAULT_PORT_PLATFORM_HTTP, | ||
| -8, "Invalid param for platformP2PAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformP2PAddrs, this ProTx version only accepts a bare port number") | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", [f"{DEFAULT_PORT_PLATFORM_P2P}"], DEFAULT_PORT_PLATFORM_HTTP, | ||
| -8, "Invalid param for platformP2PAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformP2PAddrs, this ProTx version only accepts a bare port number") | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", DEFAULT_PORT_PLATFORM_P2P, [DEFAULT_PORT_PLATFORM_HTTP], | ||
| -8, "Invalid param for platformHTTPSAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformHTTPSAddrs, this ProTx version only accepts a bare port number") | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", DEFAULT_PORT_PLATFORM_P2P, [f"{DEFAULT_PORT_PLATFORM_HTTP}"], | ||
| -8, "Invalid param for platformHTTPSAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformHTTPSAddrs, this ProTx version only accepts a bare port number") | ||
|
|
||
|
Comment on lines
284
to
293
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. Update the array-wrapped port expectations. These four assertions still only match the old prefix. They should include the new example-port and ExtNetInfo wording emitted by 🤖 Prompt for AI Agents |
||
| # coreP2PAddrs cannot be empty when registering a masternode without specifying platform fields | ||
| self.node_evo.register_mn(self, False, "", "", "", | ||
| -8, "Invalid param for platformP2PAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformP2PAddrs, this ProTx version only accepts a bare port number") | ||
| self.node_evo.register_mn(self, False, "", "", DEFAULT_PORT_PLATFORM_HTTP, | ||
| -8, "Invalid param for platformP2PAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformP2PAddrs, this ProTx version only accepts a bare port number") | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", "", "", | ||
| -8, "Invalid param for platformP2PAddrs, cannot be empty if other fields populated") | ||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", "", DEFAULT_PORT_PLATFORM_HTTP, | ||
| -8, "Invalid param for platformP2PAddrs, cannot be empty if other fields populated") | ||
| self.node_evo.register_mn(self, False, "", DEFAULT_PORT_PLATFORM_P2P, "", | ||
| -8, "Invalid param for platformHTTPSAddrs, ProTx version only supports ports") | ||
| -8, "Invalid param for platformHTTPSAddrs, this ProTx version only accepts a bare port number") | ||
|
Comment on lines
294
to
+304
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. Bring the empty-core/partial-platform cases up to date. These assertions still expect the short legacy text. Use the full 🤖 Prompt for AI Agents |
||
| self.node_evo.register_mn(self, False, f"127.0.0.1:{self.node_evo.mn.nodePort}", DEFAULT_PORT_PLATFORM_P2P, "", | ||
| -8, "Invalid param for platformHTTPSAddrs, cannot be empty if other fields populated") | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refresh the first legacy P2P rejection string.
Line 276 is missing the
Invalid param for platformP2PAddrs,prefix, and Line 278 still checks the old truncated text. Update both to the full validator message so this case actually covers the new wording.🤖 Prompt for AI Agents