lnd.xprv/watchtower
Wilmer Paulino c760700545
wtmock: prevent race conditions by not using ClientSession pointers
These race conditions originate from the mock database storing and
returning pointers, rather than returning a copy.

Observed on Travis:

WARNING: DATA RACE
Read at 0x00c0003222b8 by goroutine 149:
  github.com/lightningnetwork/lnd/watchtower/wtclient.(*sessionQueue).drainBackups()
      /home/runner/work/lnd/lnd/watchtower/wtclient/session_queue.go:288 +0xed
  github.com/lightningnetwork/lnd/watchtower/wtclient.(*sessionQueue).sessionManager()
      /home/runner/work/lnd/lnd/watchtower/wtclient/session_queue.go:281 +0x450

Previous write at 0x00c0003222b8 by goroutine 93:
  github.com/lightningnetwork/lnd/watchtower/wtclient.getClientSessions()
      /home/runner/work/lnd/lnd/watchtower/wtclient/client.go:365 +0x24f
  github.com/lightningnetwork/lnd/watchtower/wtclient.(*TowerClient).handleNewTower()
      /home/runner/work/lnd/lnd/watchtower/wtclient/client.go:1063 +0x23e
  github.com/lightningnetwork/lnd/watchtower/wtclient.(*TowerClient).backupDispatcher()
      /home/runner/work/lnd/lnd/watchtower/wtclient/client.go:784 +0x10b9
2020-05-14 15:39:03 -07:00
..
blob watchtower/multi: define blob TypeAltruistCommit and TypeRewardCommit 2019-06-13 19:54:21 -07:00
lookout input/size: assert witness size constants 2020-04-10 15:34:27 -07:00
wtclient wtclient: test case re-add removed tower 2020-05-14 13:48:08 -07:00
wtdb watchtower: convert to use new kvdb abstraction 2020-03-18 19:35:01 -07:00
wtmock wtmock: prevent race conditions by not using ClientSession pointers 2020-05-14 15:39:03 -07:00
wtpolicy chainfee: create new chainfee package extracting fees from lnwallet 2019-10-31 16:41:57 -07:00
wtserver watchtower/multi: use sane sweep fee rate in unit tests 2019-06-13 19:54:22 -07:00
wtwire watchtower/wtwire/init: use feature.ValidateRequired 2020-01-08 12:26:00 -08:00
conf.go watchtower: add externalip CLI configuration 2019-06-20 17:04:03 -07:00
config.go lnd+server+watchtower: allow Standalone access to the tor controller 2020-03-29 12:36:54 -04:00
errors.go watchtower/conf: remove experimental conditional compilation 2019-06-13 19:54:19 -07:00
interface.go watchtower/conf: abstract address normalizer to prevent import cycle 2019-06-13 19:54:19 -07:00
log.go watchtower: remove dead logging code 2020-04-24 19:15:08 +02:00
standalone.go watchtower: one append instead of appends in a loop 2020-04-24 19:15:08 +02:00