mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
watchtower/wtserver: add DisableReward config option
This commit is contained in:
@@ -54,6 +54,17 @@ func (s *Server) handleCreateSession(peer Peer, id *wtdb.SessionID,
|
||||
)
|
||||
}
|
||||
|
||||
// If the request asks for a reward session and the tower has them
|
||||
// disabled, we will reject the request.
|
||||
if s.cfg.DisableReward && req.BlobType.Has(blob.FlagReward) {
|
||||
log.Debugf("Rejecting CreateSession from %s, reward "+
|
||||
"sessions disabled", id)
|
||||
return s.replyCreateSession(
|
||||
peer, id, wtwire.CreateSessionCodeRejectBlobType, 0,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
// Now that we've established that this session does not exist in the
|
||||
// database, retrieve the sweep address that will be given to the
|
||||
// client. This address is to be included by the client when signing
|
||||
|
Reference in New Issue
Block a user