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

server: don't update feeshare and rewardcut on-chain if values are unchanged #1230

Merged
merged 1 commit into from Dec 12, 2019

Conversation

@kyriediculous
Copy link
Contributor

kyriediculous commented Dec 2, 2019

What does this pull request do? Explain your changes. (required)

This PR prevents the webserver from submitting a BondingManager.transcoder(rewardcut, feeshare) transaction to set these values on-chain when the values itself aren't changed. This prevents unnecessary gas expenditure.

Specific updates (required)

  • Moved the RPC call to BondingManager.getTranscoder above the call to BondingManager.transcoder
  • Added a check whether feeshare and rewardcut are the same as the on-chain values, only send a tx when either value or both values are changed

How did you test each of these updates (required)

Does this pull request close any open issues?
Fixes #1167

Checklist:

  • README and other documentation updated
  • Node runs in OSX and devenv
  • All tests in ./test.sh pass
@kyriediculous kyriediculous requested a review from yondonfu Dec 2, 2019
@kyriediculous kyriediculous force-pushed the nv/transcoder-update branch from 8e32624 to b72b656 Dec 2, 2019
@kyriediculous kyriediculous changed the title server: don't update feeshare and rewardcut on-chain if values are uchanged server: don't update feeshare and rewardcut on-chain if values are unchanged Dec 3, 2019
server/webserver.go Outdated Show resolved Hide resolved
Copy link
Member

yondonfu left a comment

Changes look good. Let's rebase

@kyriediculous kyriediculous force-pushed the nv/transcoder-update branch from 98479ba to 22ba459 Dec 10, 2019
@kyriediculous

This comment has been minimized.

Copy link
Contributor Author

kyriediculous commented Dec 10, 2019

rebased !

server/webserver.go Outdated Show resolved Hide resolved
Copy link
Member

yondonfu left a comment

LGTM - good to merge after a rebase

@kyriediculous kyriediculous force-pushed the nv/transcoder-update branch from bb83638 to 0dea9d8 Dec 11, 2019
@kyriediculous kyriediculous merged commit 856cc8e into master Dec 12, 2019
5 checks passed
5 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build-builder Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
livepeer.go-livepeer Build #20191211.8 succeeded
Details
livepeer.go-livepeer #20191211.8 succeeded
Details
@kyriediculous kyriediculous deleted the nv/transcoder-update branch Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.