contractcourt: fix concurrent access to launched

This commit is contained in:
yyforyongyu committed 2024-12-20 17:54:06 +08:00
1 parent 4f5ccb8650
commit d2e81a19fd
8 files changed
+27 -14

No files matched your search

+2 -2
View File
@@ -368,13 +368,13 @@ var _ reportingContractResolver = (*commitSweepResolver)(nil)
// Launch constructs a commit input and offers it to the sweeper.
func (c *commitSweepResolver) Launch() error {
if c.launched {
if c.isLaunched() {
c.log.Tracef("already launched")
return nil
}
c.log.Debugf("launching resolver...")
c.launched = true
c.markLaunched()
// If we're already resolved, then we can exit early.
if c.IsResolved() {