lnd/watchtower/wtclient/errors.go
Elle Mouton 8a7329b988
watchtower: make use of the new AddressIterator
This commit upgrades the wtclient package to make use of the new
`AddressIterator`. It does so by first creating new `Tower` and
`ClientSession` types. The new `Tower` type has an `AddressIterator`
instead of a list of addresses. The `ClientSession` type contains a
`Tower`.
2022-10-20 15:46:52 +02:00

31 lines
1.2 KiB
Go

package wtclient
import "errors"
var (
// ErrClientExiting signals that the watchtower client is shutting down.
ErrClientExiting = errors.New("watchtower client shutting down")
// ErrTowerCandidatesExhausted signals that a TowerCandidateIterator has
// cycled through all available candidates.
ErrTowerCandidatesExhausted = errors.New("exhausted all tower " +
"candidates")
// ErrPermanentTowerFailure signals that the tower has reported that it
// has permanently failed or the client believes this has happened based
// on the tower's behavior.
ErrPermanentTowerFailure = errors.New("permanent tower failure")
// ErrNegotiatorExiting signals that the SessionNegotiator is shutting
// down.
ErrNegotiatorExiting = errors.New("negotiator exiting")
// ErrFailedNegotiation signals that the session negotiator could not
// acquire a new session as requested.
ErrFailedNegotiation = errors.New("session negotiation unsuccessful")
// ErrUnregisteredChannel signals that the client was unable to backup a
// revoked state because the channel had not been previously registered
// with the client.
ErrUnregisteredChannel = errors.New("channel is not registered")
)