htlcswitch: add channel link config
Step №1 in making htlcManager (aka channelLink) testable: Start use config which will allow as mock/stub external subsystems.
This commit is contained in:
1 parent
0de4ea2712
commit
7f572fc155
3 files changed
+55
No files matched your search
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/roasbeef/btcutil"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
)
|
||||
|
||||
type mockServer struct {
|
||||
@@ -152,6 +153,10 @@ func (s *mockServer) Disconnect() {
|
||||
s.t.Fatalf("server %v was disconnected", s.name)
|
||||
}
|
||||
|
||||
func (s *mockServer) WipeChannel(*lnwallet.LightningChannel) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *mockServer) Stop() {
|
||||
if !atomic.CompareAndSwapInt32(&s.shutdown, 0, 1) {
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user