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

RateLimiter: new view functions + their test coverage #145

Merged
merged 3 commits into from
May 18, 2022

Conversation

ChiTimesChi
Copy link
Collaborator

@ChiTimesChi ChiTimesChi commented May 14, 2022

Description

Added a bunch of new view functions for RateLimiter, updated the tests to cover them.

function getTransactionAt(uint256 index)
    external
    view
    returns (
        bytes32 key,
        bytes memory payload,
        uint32 storedAtMin
    );

function getTransactionByKappa(bytes32 kappa)
    external
    view
    returns (bytes memory payload, uint32 storedAtMin);

function getUnhandledKappas()
    external
    view
    returns (bytes32[] memory kappas);

function unhandledKappasCount() external view returns (uint256 kappaCount);

Checklist

  • New Contracts have been tested
  • Lint has been run
  • I have checked my code and corrected any misspellings

@coveralls
Copy link

coveralls commented May 14, 2022

Pull Request Test Coverage Report for Build 2327972853

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 20 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 51.578%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/bridge/RateLimiter.sol 0 20 0.0%
Totals Coverage Status
Change from base Build 2310283189: -0.7%
Covered Lines: 803
Relevant Lines: 1479

💛 - Coveralls

@trajan0x
Copy link
Contributor

trajan0x commented May 14, 2022

Needs coverage for:

  • getTransactionByKappa
  • getTransactionAt

@trajan0x trajan0x marked this pull request as draft May 14, 2022 23:25
@trajan0x trajan0x requested review from trajan0x and aureliusbtc May 14, 2022 23:25
@trajan0x trajan0x force-pushed the feature/rate-limiter-enhanced-queue branch from c40e3ae to c9b492e Compare May 15, 2022 18:36
@trajan0x trajan0x marked this pull request as ready for review May 15, 2022 18:38
@trajan0x trajan0x merged commit 45ae6e9 into feature/rate-limiter May 18, 2022
@trajan0x trajan0x deleted the feature/rate-limiter-enhanced-queue branch May 18, 2022 05:21
trajan0x added a commit that referenced this pull request May 18, 2022
* RateLimiter: view functions + their test coverage

* fix doc generation

* update rate limiter test

Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com>
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.

3 participants