Skip to content

Check bonding state before activating orchestrator in CLI#3892

Open
Lazydayz137 wants to merge 1 commit intolivepeer:masterfrom
Lazydayz137:fix/2643-cli-already-bonded-error
Open

Check bonding state before activating orchestrator in CLI#3892
Lazydayz137 wants to merge 1 commit intolivepeer:masterfrom
Lazydayz137:fix/2643-cli-already-bonded-error

Conversation

@Lazydayz137
Copy link
Copy Markdown

What does this pull request do?

Adds a pre-flight check that queries on-chain bonding state before the bond transaction, returning a clear error instead of the misleading "ERC20: transfer amount exceeds balance" message.

Specific updates

  • Query GetDelegator before bond transaction in activateOrchestratorHandler
  • Return 400 with actionable message if wallet is bonded to a different address
  • Handle nil delegator and nil BondedAmount defensively
  • Add GetDelegator mock expectation to TestActivateOrchestratorHandler_Success

How did you test each of these updates?

  • go test ./server/... passes
  • go vet ./server/... clean
  • gofmt clean

Does this pull request close any open issues?

Fixes #2643

Checklist

  • I have read the contribution guide
  • make and tests run successfully
  • Code is formatted with gofmt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the go Pull requests that update Go code label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

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

1 participant