metachris / flashbotsrpc

Golang client for Flashbots Relay, mev-geth and standard Ethereum JSON-RPC API endpoints
https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint/
MIT License
165 stars 55 forks source link

fix http client configuration #29

Closed TymKh closed 3 months ago

TymKh commented 3 months ago

Previously WithHttpClient option would be always overwritten. Now, timeout client is used by default but if user is sophisticated enough to configure http client - this option will be preferred. Reason is that golang default http client is suboptimal for multiple performance considerations (such as reusing httpclients when heavily interacting with the same server)