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
@@ -178,13 +178,13 @@ var _ ContractResolver = (*anchorResolver)(nil)
// Launch offers the anchor output to the sweeper.
func (c *anchorResolver) 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() {