mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +01:00
watchtower/wtserver: add NoAckCreateSession for testing
This commit is contained in:
parent
1000223c71
commit
1622a212d7
2 changed files with 11 additions and 0 deletions
|
@ -122,6 +122,13 @@ func (s *Server) handleCreateSession(peer Peer, id *wtdb.SessionID,
|
|||
func (s *Server) replyCreateSession(peer Peer, id *wtdb.SessionID,
|
||||
code wtwire.ErrorCode, lastApplied uint16, data []byte) error {
|
||||
|
||||
if s.cfg.NoAckCreateSession {
|
||||
return &connFailure{
|
||||
ID: *id,
|
||||
Code: code,
|
||||
}
|
||||
}
|
||||
|
||||
msg := &wtwire.CreateSessionReply{
|
||||
Code: code,
|
||||
LastApplied: lastApplied,
|
||||
|
|
|
@ -56,6 +56,10 @@ type Config struct {
|
|||
// ChainHash identifies the network that the server is watching.
|
||||
ChainHash chainhash.Hash
|
||||
|
||||
// NoAckCreateSession causes the server to not reply to create session
|
||||
// requests, this should only be used for testing.
|
||||
NoAckCreateSession bool
|
||||
|
||||
// NoAckUpdates causes the server to not acknowledge state updates, this
|
||||
// should only be used for testing.
|
||||
NoAckUpdates bool
|
||||
|
|
Loading…
Add table
Reference in a new issue