rpc: acquire global coin select lock in related RPCs

This ensures proper coin selection synchronization between lnd and users
of the RPC to avoid potential double spend errors.
This commit is contained in:
Wilmer Paulino committed 2020-06-12 11:22:29 -07:00
1 parent 9d9e54f83e
commit c2f1fe26c1
4 files changed
+44 -4

No files matched your search

+7
View File
@@ -38,6 +38,13 @@ type Config struct {
// any relevant requests to.
Wallet lnwallet.WalletController
// CoinSelectionLocker allows the caller to perform an operation, which
// is synchronized with all coin selection attempts. This can be used
// when an operation requires that all coin selection operations cease
// forward progress. Think of this as an exclusive lock on coin
// selection operations.
CoinSelectionLocker sweep.CoinSelectionLocker
// KeyRing is an interface that the WalletKit will use to derive any
// keys due to incoming client requests.
KeyRing keychain.KeyRing