XRPLF / xrpl-py

A Python library to interact with the XRP Ledger (XRPL) blockchain
ISC License
144 stars 83 forks source link

Custom timeout for requests #687

Closed ckeshava closed 1 month ago

ckeshava commented 4 months ago

High Level Overview of Change

Certain requests could take more time to return a response, than the default 10 seconds duration. This change allows users to specify a custom timeout parameter to all requests. Additionally, this PR sets up uniform interfaces for all Client._request_impl overridden functions.

Context of Change

In the present code, all requests are given 10 seconds duration to return a response. Any longer latency results in a timeout. This is inconvenient for certain commands that are known to take up more time, for instance, admin-only commands like the ledger command.

Type of Change

Did you update CHANGELOG.md?

Test Plan

This is an existing integration test that invokes the ledger command at tests/integration/reqs/test_ledger.py. Which other command might take up more time?

ledhed2222 commented 2 months ago

i just happened to see this. it looks good to me! great idea :)

ckeshava commented 1 month ago

thank you for the reviews. If there are no more objections, I'd like to merge this PR