Skip to content
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

Ensure mempool estimates take precedence #49

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Ensure mempool estimates take precedence #49

merged 1 commit into from
Feb 19, 2024

Conversation

mrfelton
Copy link
Member

This pull request introduces several changes in the DataProviderManager.ts, esplora.ts, mempool.ts, and DataProviderManager.test.ts files. The key modifications include the addition of a new MempoolProvider import, changes to the DataProviderManager class constructor, and modifications to the getSortedDataPoints method. Additionally, the EsploraProvider and MempoolProvider class constructors were updated to use a new TIMEOUT constant imported from util. Lastly, a new test case was added to DataProviderManager.test.ts to ensure that providers are sorted correctly.

Changes to DataProviderManager.ts:

  • Imported MempoolProvider from ../providers/mempool.
  • Updated the DataProviderManager class constructor to provide default values for cacheConfig.
  • Modified the getSortedDataPoints method to prioritize mempool-based estimates and made it public.

Changes to esplora.ts and mempool.ts:

  • Imported TIMEOUT from ../lib/util and used it as the default value for defaultTimeout in the EsploraProvider and MempoolProvider class constructors [1] [2] [3] [4].
  • Updated the example URL in the EsploraProvider class documentation.

Changes to DataProviderManager.test.ts:

  • Imported MempoolProvider and EsploraProvider from their respective modules.
  • Added a new test case to ensure that providers are sorted correctly.

@mrfelton mrfelton self-assigned this Feb 19, 2024
@mrfelton mrfelton merged commit b31a4da into master Feb 19, 2024
1 check passed
@mrfelton mrfelton deleted the refactor branch February 19, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant