-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement threshold strategy (#287)
Follow-up on #286 to implement the threshold strategy to aggregate responses from multiple providers: - Introduce a top-level `MultiCallResults::reduce` method which takes as parameter a `ConsensusStrategy` to aggregate the various responses. All existing methods, including `eth_fee_history`, were refactor to use the new `reduce` method. - In case of `ConsensusStrategy::Threshold`, the reduction strategy simply consists of returning the most frequent (non-error) response if it appeared at least the specified threshold number of times. - Refactor `MultiCallResults` to stored ok results and errors separately.
- Loading branch information
1 parent
4661cef
commit 691f840
Showing
13 changed files
with
544 additions
and
559 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.