contractcourt: fix concurrent access to launched

This commit is contained in:
yyforyongyu
2024-07-11 16:19:01 +08:00
parent 4f5ccb8650
commit d2e81a19fd
8 changed files with 27 additions and 14 deletions

View File

@@ -130,13 +130,13 @@ var _ ContractResolver = (*breachResolver)(nil)
//
// TODO(yy): implement it once the outputs are offered to the sweeper.
func (b *breachResolver) Launch() error {
if b.launched {
if b.isLaunched() {
b.log.Tracef("already launched")
return nil
}
b.log.Debugf("launching resolver...")
b.launched = true
b.markLaunched()
return nil
}