lnd.xprv/chanacceptor
carla 54c3e98b40
multi: move channel acceptor logic out of rpcserver
This commit moves and partially refactors the channel acceptor logic
added in c2a6c86e into the channel acceptor package. This allows us to
use the same logic in our unit tests as the rpcserver, rather than
needing to replicate it in unit tests.

Two changes are made to the existing implementation:
- Rather than having the Accept function run a closure, the closure
  originally used in the rpcserver is moved directly into Accept
- The done channel used to signal client exit is moved into the acceptor
  because the rpc server does not need knowledge of this detail (in
  addition to other fields required for mocking the actual rpc).

Crediting orginal committer as co-author:
Co-authored-by: Crypt-iQ
2020-11-10 11:38:45 +02:00
..
acceptor_test.go multi: move channel acceptor logic out of rpcserver 2020-11-10 11:38:45 +02:00
chainedacceptor.go chanacceptor: Adding Chained and RPC acceptors 2019-09-25 12:07:30 -04:00
interface.go chanacceptor: Adding Chained and RPC acceptors 2019-09-25 12:07:30 -04:00
log.go multi: move channel acceptor logic out of rpcserver 2020-11-10 11:38:45 +02:00
rpcacceptor.go multi: move channel acceptor logic out of rpcserver 2020-11-10 11:38:45 +02:00