aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/faucet/faucet.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/faucet/faucet.go')
-rw-r--r--cmd/faucet/faucet.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go
index 5f16f2978..99527f9d1 100644
--- a/cmd/faucet/faucet.go
+++ b/cmd/faucet/faucet.go
@@ -18,10 +18,10 @@
package main
//go:generate go-bindata -nometadata -o website.go faucet.html
+//go:generate gofmt -w -s website.go
import (
"bytes"
- "compress/zlib"
"context"
"encoding/json"
"errors"
@@ -223,7 +223,6 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
NoDiscovery: true,
DiscoveryV5: true,
ListenAddr: fmt.Sprintf(":%d", port),
- DiscoveryV5Addr: fmt.Sprintf(":%d", port+1),
MaxPeers: 25,
BootstrapNodesV5: enodes,
},
@@ -474,7 +473,7 @@ func (f *faucet) apiHandler(conn *websocket.Conn) {
amount = new(big.Int).Mul(amount, new(big.Int).Exp(big.NewInt(5), big.NewInt(int64(msg.Tier)), nil))
amount = new(big.Int).Div(amount, new(big.Int).Exp(big.NewInt(2), big.NewInt(int64(msg.Tier)), nil))
- tx := types.NewTransaction(f.nonce+uint64(len(f.reqs)), address, amount, big.NewInt(21000), f.price, nil)
+ tx := types.NewTransaction(f.nonce+uint64(len(f.reqs)), address, amount, 21000, f.price, nil)
signed, err := f.keystore.SignTx(f.account, tx, f.config.ChainId)
if err != nil {
f.lock.Unlock()
@@ -698,11 +697,7 @@ func authTwitter(url string) (string, string, common.Address, error) {
}
defer res.Body.Close()
- reader, err := zlib.NewReader(res.Body)
- if err != nil {
- return "", "", common.Address{}, err
- }
- body, err := ioutil.ReadAll(reader)
+ body, err := ioutil.ReadAll(res.Body)
if err != nil {
return "", "", common.Address{}, err
}