Skip to content

Commit

Permalink
eth: client setup cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kyriediculous committed Mar 9, 2021
1 parent 829cd90 commit f4b7fd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cmd/devtool/devtool.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ func ethSetup(ethAcctAddr, keystoreDir string, isBroadcaster bool) {
}
glog.Infof("Using controller address %s", ethController)

client, err := eth.NewClient(ethcommon.HexToAddress(ethAcctAddr), keystoreDir, backend,
ethcommon.HexToAddress(ethController), ethTxTimeout)
client, err := eth.NewClient(ethcommon.HexToAddress(ethAcctAddr), keystoreDir, passphrase, backend,
ethcommon.HexToAddress(ethController), ethTxTimeout, nil)
if err != nil {
glog.Errorf("Failed to create client: %v", err)
return
Expand Down
9 changes: 1 addition & 8 deletions eth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ var (
)

type LivepeerEthClient interface {
Setup(password string, gasLimit uint64, gasPrice *big.Int) error
Account() accounts.Account
Backend() (Backend, error)

Expand Down Expand Up @@ -774,13 +773,7 @@ func (c *client) Vote(pollAddr ethcommon.Address, choiceID *big.Int) (*types.Tra
return nil, err
}

gl, gp := c.GetGasInfo()
opts, err := c.accountManager.CreateTransactOpts(gl, gp)
if err != nil {
return nil, err
}

return poll.Vote(opts, choiceID)
return poll.Vote(nil, choiceID)
}

func (c *client) Reward() (*types.Transaction, error) {
Expand Down

0 comments on commit f4b7fd1

Please sign in to comment.