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

Implement simplified faucet #2391

Merged
merged 21 commits into from
Aug 29, 2022
Merged

Implement simplified faucet #2391

merged 21 commits into from
Aug 29, 2022

Conversation

jkrvivian
Copy link
Contributor

@jkrvivian jkrvivian commented Aug 19, 2022

Description of change

Type of change

  • Breaking change

Change checklist

  • My code follows the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@jkrvivian jkrvivian requested review from karimodm and daria305 August 19, 2022 13:43
Copy link
Contributor

@piotrm50 piotrm50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use client/wallet package to manage funds and addresses instead of having to manage it in the faucet plugin. It'd make the code more simple and readable.
If we configure the wallet to reuse the same address, then it will always read the correct state from the tangle.
It also would be nice to only handle requests that are not older than X minutes, because otherwise in case of faucet node restart, it would try to fullfill all the requests again.

plugins/faucet/plugin.go Outdated Show resolved Hide resolved
plugins/faucet/plugin.go Outdated Show resolved Hide resolved
plugins/faucet/faucet.go Outdated Show resolved Hide resolved
plugins/faucet/faucet.go Outdated Show resolved Hide resolved
plugins/faucet/parameters.go Outdated Show resolved Hide resolved
plugins/faucet/parameters.go Outdated Show resolved Hide resolved
plugins/faucet/parameters.go Outdated Show resolved Hide resolved
plugins/faucet/plugin.go Outdated Show resolved Hide resolved
@jkrvivian jkrvivian force-pushed the feat/simplify-faucet branch from 1479d84 to ec846df Compare August 23, 2022 15:00
Copy link
Contributor

@piotrm50 piotrm50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the faucet request window check, fix the tests and I think it's good to go :)

plugins/faucet/plugin.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jonastheis jonastheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks already pretty good and makes everything so much simpler. But I think some things can still be improved

plugins/faucet/connector.go Outdated Show resolved Hide resolved
plugins/faucet/connector.go Outdated Show resolved Hide resolved
plugins/faucet/connector.go Outdated Show resolved Hide resolved
plugins/faucet/faucet.go Outdated Show resolved Hide resolved
plugins/faucet/faucet.go Outdated Show resolved Hide resolved
plugins/faucet/faucet.go Outdated Show resolved Hide resolved
plugins/faucet/faucet.go Outdated Show resolved Hide resolved
plugins/faucet/faucet.go Outdated Show resolved Hide resolved
plugins/faucet/plugin.go Show resolved Hide resolved
plugins/faucet/connector.go Show resolved Hide resolved
@piotrm50 piotrm50 temporarily deployed to feature August 26, 2022 11:36 Inactive
…a faucet request in the second transaction and simplify code even more
plugins/faucet/faucet.go Fixed Show fixed Hide fixed
@jonastheis jonastheis merged commit 6c1b4e7 into develop Aug 29, 2022
@jonastheis jonastheis deleted the feat/simplify-faucet branch August 29, 2022 11:28
This was referenced Aug 31, 2022
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