Skip to content

Commit

Permalink
cmd: adjust livepeer CLI for max gas price
Browse files Browse the repository at this point in the history
  • Loading branch information
kyriediculous committed Jan 7, 2021
1 parent 776a65a commit 28df87e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/livepeer_cli/livepeer_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (w *wizard) initializeOptions() []wizardOpt {
{desc: "Invoke \"cancel unlock of broadcasting funds\"", invoke: w.cancelUnlock, notOrchestrator: true},
{desc: "Invoke \"withdraw broadcasting funds\"", invoke: w.withdraw, notOrchestrator: true},
{desc: "Set broadcast config", invoke: w.setBroadcastConfig, notOrchestrator: true},
{desc: "Set Eth gas price", invoke: w.setGasPrice},
{desc: "Set maximum Ethereum gas price", invoke: w.setMaxGasPrice},
{desc: "Get test LPT", invoke: w.requestTokens, testnet: true},
{desc: "Get test ETH", invoke: func() {
fmt.Print("For Rinkeby Eth, go to the Rinkeby faucet (https://faucet.rinkeby.io/).")
Expand Down
8 changes: 4 additions & 4 deletions cmd/livepeer_cli/wizard_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import (
"net/url"
)

func (w *wizard) setGasPrice() {
fmt.Printf("Current gas price: %v\n", w.getGasPrice())
fmt.Printf("Enter new gas price in Wei (enter \"0\" for automatic)")
func (w *wizard) setMaxGasPrice() {
fmt.Printf("Current maximum gas price: %v\n", w.getGasPrice())
fmt.Printf("Enter new maximum gas price in Wei (enter \"0\" for automatic)")
amount := w.readBigInt()

val := url.Values{
"amount": {fmt.Sprintf("%v", amount.String())},
}

httpPostWithParams(fmt.Sprintf("http://%v:%v/setGasPrice", w.host, w.httpPort), val)
httpPostWithParams(fmt.Sprintf("http://%v:%v/setMaxGasPrice", w.host, w.httpPort), val)
}

func (w *wizard) signMessage() {
Expand Down

0 comments on commit 28df87e

Please sign in to comment.