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

Remove unused TokenNetwork.max #1431

Merged
merged 1 commit into from
Mar 1, 2021
Merged

Conversation

palango
Copy link
Contributor

@palango palango commented Mar 1, 2021

Found as part of #401

What this PR does

Remove the unused TokenNetwork.max function and the according tests.

Why I'm making this PR

This reduces the contract size a bit, and removes unused code.

What's tricky about this PR (if any)


Any reviewer can check these:

  • If the PR is fixing a bug or adding a feature, add an entry to CHANGELOG.md.
  • If the PR changed a Solidity source, run make compile_contracts and add the resulting raiden_contracts/data/contracts.json in the PR.
  • If the PR is changing documentation only, add [skip ci] in the commit message so Travis does not waste time.
    • But, if the PR changes comments in a Solidity source, do not add [skip ci] and let Travis check the hash of the source.
  • In Python, use keyword arguments
  • Squash unnecessary commits
  • Comment commits
  • Follow naming conventions
    • solidityFunction
    • _solidity_argument
    • solidity_variable
    • python_variable
    • PYTHON_CONSTANT
  • Follow the Signature Convention in CONTRIBUTING.md
  • For each new contract
    • The deployment script deploys the new contract.
    • etherscan_verify.py runs on the new contract.
  • Bookkeep
    • The gas cost of new functions are stored in gas.json.
  • Solidity specific conventions
    • Document arguments of functions in natspec
    • Care reentrancy problems
    • if the PR adds or removes require() or assert()
      • add an entry in Changelog
      • open an issue in the client, light client, service repos so the change is reflected there
      • Just adding a message in require() doesn't require these steps.
  • When you catch a require() failure in Solidity, look for a specific error message like pytest.raises(TransactionFailed, match="error message"):

And before "merge" all checkboxes have to be checked. If you find redundant points, remove them.

@palango palango requested a review from karlb March 1, 2021 11:52
This reduces the contract size a bit.
@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #1431 (8d0a8d6) into master (74f45fb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1431   +/-   ##
=======================================
  Coverage   80.27%   80.27%           
=======================================
  Files          21       21           
  Lines        1516     1516           
  Branches      187      187           
=======================================
  Hits         1217     1217           
  Misses        253      253           
  Partials       46       46           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74f45fb...8d0a8d6. Read the comment docs.

@karlb karlb merged commit 7dfd1c0 into raiden-network:master Mar 1, 2021
@palango palango deleted the remove-max branch June 21, 2021 14:19
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.

2 participants