Skip to content

livepeer_cli logs incorrect error message when attempting to setup O which is already bonded #2643

@Strykar

Description

@Strykar

Describe the bug
When attempting to bond LPT to begin becoming an Orchestrator via livepeer_cli, it will incorrectly state that the bonded LPT amount is less than what the wallet holds.
It actually fails because you cannot be bonded to an O and then start your own O with the same wallet unless all the LPT is unbonded first.

Steps to reproduce the behavior:

  1. Stake any O, then attempt to create an Orchestrator using the same wallet with some unbonded LPT in it, say 5 LPT. During the bonding step, you will see:
You must bond to yourself in order to become a orchestrator
Enter bond amount - > 5000000000000000000
Error activating orchestrator: execution reverted: ERC20: transfer amount exceeds balance

Expected behavior
livepeer_cli should inform the user when they invoke step 12. Invoke multi-step "become an orchestrator" that the wallet is already bonded and thus cannot become an Orchestrator until all the LPT is unbonded first.
Unlike the misleading and incorrect Error activating orchestrator: execution reverted: ERC20: transfer amount exceeds balance.

Additional context
This is a fringe case, but the log message here could definitely be improved.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions