livepeer / livepeer/testnet-services
Faucet should not send tx when request is invalid
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
At the moment, the faucet will still send a tx even if the HTTP handler fails to decode the JSON request body: https://github.com/livepeer/testnet-services/blob/master/simple-eth-faucet/faucet.go#L106
The handler should return if the JSON request body decode fails.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in simple-eth-faucet/faucet.go around line 106, where the HTTP handler decodes the JSON request body. Verify how decode failure is handled and confirm that the handler returns before sending a transaction. Done means invalid JSON requests no longer trigger a transaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100