mirror of
https://github.com/lightninglabs/pool.git
synced 2026-08-16 13:00:39 +02:00
account: disable renewAccount for StatePendingBatch status
If the account is currently participating in a batch (`StatePendingBatch`) we disable the renewAccount command. After enabling account autorenew it could be problematic to renew your account before the batch is confirmed and you account expiry height gets updated.
This commit is contained in:
parent
cb53898136
commit
2e724ad4d6
1 changed files with 2 additions and 2 deletions
|
|
@ -1212,11 +1212,11 @@ func (m *Manager) RenewAccount(ctx context.Context,
|
|||
return nil, nil, err
|
||||
}
|
||||
switch account.State {
|
||||
case StateOpen, StatePendingBatch, StateExpired:
|
||||
case StateOpen, StateExpired:
|
||||
default:
|
||||
return nil, nil, fmt.Errorf("account must be in either of %v "+
|
||||
"to be renewed",
|
||||
[]State{StateOpen, StatePendingBatch, StateExpired})
|
||||
[]State{StateOpen, StateExpired})
|
||||
}
|
||||
|
||||
// Validate the new expiry.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue