Skip to content

Commit bfdacb3

Browse files
committed
Don't broadcast without SOPs
1 parent 360144c commit bfdacb3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/txm/clientwrappers/dualbroadcast/meta_client.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ func (a *MetaClient) SendRequest(parentCtx context.Context, tx *types.Transactio
298298
}
299299

300300
if response.Error.ErrorMessage != "" {
301+
if strings.Contains(response.Error.ErrorMessage, "no solver operations received") {
302+
return nil, nil
303+
}
301304
return nil, errors.New(response.Error.ErrorMessage)
302305
}
303306

@@ -401,11 +404,16 @@ func VerifyMetadata(txData []byte, fromAddress common.Address, result Metacallda
401404
}
402405

403406
// SOP
407+
atLeastOne := false
404408
for _, sop := range result.SOPs {
405409
if sop.To != to || sop.Control != dApp {
406410
// Exit early
407411
return nil, fmt.Errorf("incorrect SOP: sop.To: %v, sop.Control: %v, to: %v, dApp: %v", sop.To, sop.Control, to, dApp)
408412
}
413+
atLeastOne = true
414+
}
415+
if !atLeastOne {
416+
return nil, nil
409417
}
410418

411419
// UOP

0 commit comments

Comments
 (0)