generated from flashbots/flashbots-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
send version in useragent header (#213)
- Loading branch information
Showing
8 changed files
with
71 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,9 @@ func TestParseRelaysURLs(t *testing.T) { | |
name: "Relay URL with protocol scheme", | ||
relayURL: fmt.Sprintf("http://%[email protected]", publicKey.String()), | ||
|
||
expectedURI: "http://foo.com?boost=dev", | ||
expectedURI: "http://foo.com", | ||
expectedPublicKey: publicKey.String(), | ||
expectedURL: fmt.Sprintf("http://%[email protected]?boost=dev", publicKey.String()), | ||
expectedURL: fmt.Sprintf("http://%[email protected]", publicKey.String()), | ||
}, | ||
{ | ||
name: "Relay URL without protocol scheme, without public key", | ||
|
@@ -40,33 +40,33 @@ func TestParseRelaysURLs(t *testing.T) { | |
name: "Relay URL without protocol scheme and with public key", | ||
relayURL: publicKey.String() + "@foo.com", | ||
|
||
expectedURI: "http://foo.com?boost=dev", | ||
expectedURI: "http://foo.com", | ||
expectedPublicKey: publicKey.String(), | ||
expectedURL: "http://" + publicKey.String() + "@foo.com?boost=dev", | ||
expectedURL: "http://" + publicKey.String() + "@foo.com", | ||
}, | ||
{ | ||
name: "Relay URL with public key host and port", | ||
relayURL: publicKey.String() + "@foo.com:9999", | ||
|
||
expectedURI: "http://foo.com:9999?boost=dev", | ||
expectedURI: "http://foo.com:9999", | ||
expectedPublicKey: publicKey.String(), | ||
expectedURL: "http://" + publicKey.String() + "@foo.com:9999?boost=dev", | ||
expectedURL: "http://" + publicKey.String() + "@foo.com:9999", | ||
}, | ||
{ | ||
name: "Relay URL with IP and port", | ||
relayURL: publicKey.String() + "@12.345.678:9999", | ||
|
||
expectedURI: "http://12.345.678:9999?boost=dev", | ||
expectedURI: "http://12.345.678:9999", | ||
expectedPublicKey: publicKey.String(), | ||
expectedURL: "http://" + publicKey.String() + "@12.345.678:9999?boost=dev", | ||
expectedURL: "http://" + publicKey.String() + "@12.345.678:9999", | ||
}, | ||
{ | ||
name: "Relay URL with https IP and port", | ||
relayURL: "https://" + publicKey.String() + "@12.345.678:9999", | ||
|
||
expectedURI: "https://12.345.678:9999?boost=dev", | ||
expectedURI: "https://12.345.678:9999", | ||
expectedPublicKey: publicKey.String(), | ||
expectedURL: "https://" + publicKey.String() + "@12.345.678:9999?boost=dev", | ||
expectedURL: "https://" + publicKey.String() + "@12.345.678:9999", | ||
}, | ||
{ | ||
name: "Invalid relay public key", | ||
|
@@ -78,9 +78,9 @@ func TestParseRelaysURLs(t *testing.T) { | |
name: "Relay URL with query arg", | ||
relayURL: fmt.Sprintf("http://%[email protected]?id=foo&bar=1", publicKey.String()), | ||
|
||
expectedURI: "http://foo.com?bar=1&boost=dev&id=foo", | ||
expectedURI: "http://foo.com?id=foo&bar=1", | ||
expectedPublicKey: publicKey.String(), | ||
expectedURL: fmt.Sprintf("http://%[email protected]?bar=1&boost=dev&id=foo", publicKey.String()), | ||
expectedURL: fmt.Sprintf("http://%[email protected]?id=foo&bar=1", publicKey.String()), | ||
}, | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters