go-livepeer
go-livepeer copied to clipboard
BYOC: fix payment ticket count calc
What does this pull request do? Explain your changes. (required)
Updates createPayment to accurately calculate ticket count.
Specific updates (required)
- The slice created with
makedid not have a length as expected. Instead it has a capacity of the providedlen(ticket.SenderParams)
How did you test each of these updates (required)
Tested locally using Agent SPE request example and observed the ticket count changed with each change in timeout_seconds in the request to accurately send 1 ticket per second of expected compute.
Does this pull request close any open issues?
Checklist:
- [ ] Read the contribution guide
- [X]
makeruns successfully - [X] All tests in
./test.shpass - [ ] README and other documentation updated
- [ ] Pending changelog updated
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 31.96943%. Comparing base (
32516bc) to head (64597cb). Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #3650 +/- ##
===================================================
+ Coverage 31.86089% 31.96943% +0.10854%
===================================================
Files 156 156
Lines 47359 47364 +5
===================================================
+ Hits 15089 15142 +53
+ Misses 31382 31328 -54
- Partials 888 894 +6
| Files with missing lines | Coverage Δ | |
|---|---|---|
| server/job_rpc.go | 30.02309% <100.00000%> (+6.56200%) |
:arrow_up: |
... and 2 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 32516bc...64597cb. Read the comment docs.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| server/job_rpc.go | 30.02309% <100.00000%> (+6.56200%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.