mirror of
https://github.com/lightninglabs/pool.git
synced 2026-08-18 13:08:33 +02:00
auctioneer: use StateInitiated for pending/open recovered accounts
Using this state allows the trader to locate the transaction locally for recovered accounts in a pending open or open state. There is no risk of double sending funds in this case, as that's prevented through the recovery branch within the account manager.
This commit is contained in:
parent
203627643b
commit
bf21305205
1 changed files with 3 additions and 3 deletions
|
|
@ -651,7 +651,7 @@ func (c *Client) RecoverAccounts(ctx context.Context,
|
|||
}
|
||||
|
||||
// Account is ok, parse the rest of the fields.
|
||||
acct, err := unmarshallServerAccount(
|
||||
acct, err := unmarshallServerRecoveredAccount(
|
||||
keyDesc, acctMsg.Account,
|
||||
)
|
||||
if err != nil {
|
||||
|
|
@ -1020,7 +1020,7 @@ func (c *Client) HandleServerShutdown(err error) error {
|
|||
|
||||
// unmarshallServerAccount parses the account information sent from the
|
||||
// auctioneer into our local account struct.
|
||||
func unmarshallServerAccount(keyDesc *keychain.KeyDescriptor,
|
||||
func unmarshallServerRecoveredAccount(keyDesc *keychain.KeyDescriptor,
|
||||
a *clmrpc.AuctionAccount) (*account.Account, error) {
|
||||
|
||||
// Parse all raw public keys.
|
||||
|
|
@ -1044,7 +1044,7 @@ func unmarshallServerAccount(keyDesc *keychain.KeyDescriptor,
|
|||
case clmrpc.AuctionAccountState_STATE_OPEN,
|
||||
clmrpc.AuctionAccountState_STATE_PENDING_OPEN:
|
||||
|
||||
state = account.StatePendingOpen
|
||||
state = account.StateInitiated
|
||||
|
||||
case clmrpc.AuctionAccountState_STATE_CLOSED:
|
||||
state = account.StatePendingClosed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue