mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
htlcswitch: modify the SendMessage method on the Peer interface to optionally block
In this commit, add a new argument to the SendMessage method to allow callers to request that the method block until the message has been sent on the socket to the remote peer.
This commit is contained in:
@@ -447,7 +447,7 @@ func (s *mockServer) intersect(f messageInterceptor) {
|
||||
s.interceptorFuncs = append(s.interceptorFuncs, f)
|
||||
}
|
||||
|
||||
func (s *mockServer) SendMessage(message lnwire.Message) error {
|
||||
func (s *mockServer) SendMessage(message lnwire.Message, sync bool) error {
|
||||
|
||||
select {
|
||||
case s.messages <- message:
|
||||
|
Reference in New Issue
Block a user