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.
@@ -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.
