lnd.xprv/contractcourt
Johan T. Halseth 5476f6d310
contractcourt/contract_resolvers: correct off-by-one HTLC expiry
This commit attempts to fix an inconsistency in when we consider an HTLC
to expire. When we first launched the resolver we would compare the
current block height against the expiry, while for new incoming blocks
we would compare against expiry-1.

This lead to a flake during integration tests, during a call to
RestartNode after _exactly_ enough blocks for the HTLC to expire. In
some cases the resolver would see the new blocks and consider the HTLC
to be expired (because of the -1), while in some cases resolver would
shut down before seeing the new blocks, and upon restart wouldn't act on
the new height because we did not compare against -1.

This commit fixes this by doing the same comparison in both cases.
2018-08-14 09:15:48 +02:00
..
briefcase_test.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
briefcase.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
chain_arbitrator_test.go contractcourt: add new ChainArbitrator struct as central coordinator of package 2018-01-22 19:19:36 -08:00
chain_arbitrator.go multi: update to latest RegisterBlockEpochNtfn interface 2018-08-10 01:08:57 -07:00
chain_watcher_test.go multi: update to latest RegisterBlockEpochNtfn interface 2018-08-10 01:08:57 -07:00
chain_watcher.go contractcourt: update chain watcher to make funding pkScript for spend ntfn 2018-07-31 21:29:00 -07:00
channel_arbitrator_test.go contractcourt: update channel arbitrator unit tests due to recent API changes 2018-07-31 21:29:01 -07:00
channel_arbitrator.go contractcourt: update channel arbitrator unit tests due to recent API changes 2018-07-31 21:29:01 -07:00
contract_resolvers_test.go contractcourt: add complete ContractResolver implementations 2018-01-22 19:19:36 -08:00
contract_resolvers.go contractcourt/contract_resolvers: correct off-by-one HTLC expiry 2018-08-14 09:15:48 +02:00
log.go contractcourt: create new package, add logger 2018-01-22 19:19:34 -08:00