aa6e5bdd2a
This commit fixes a potential race condition within the IncomingContestResolver, that could cause us to miss a preimage that was delivered in time. Currently we query the db for the preimage, and then subscribe for notifications. This permits the following ordering of events: - query for preimage, returns nothing - preimage is added and delivered to subscribers - subscribe to preimages - preimage never comes through!! We fix this by reordering to subscribe for preimages and then query just in case it already exists. The effect is that the query will always return a valid read of the preimages that are currently queued for delivery. |
||
---|---|---|
.. | ||
briefcase_test.go | ||
briefcase.go | ||
chain_arbitrator_test.go | ||
chain_arbitrator.go | ||
chain_watcher_test.go | ||
chain_watcher.go | ||
channel_arbitrator_test.go | ||
channel_arbitrator.go | ||
contract_resolvers_test.go | ||
contract_resolvers.go | ||
log.go |