Skip to content

Commit

Permalink
fix privacy check
Browse files Browse the repository at this point in the history
  • Loading branch information
TymKh committed May 14, 2024
1 parent efd7bfe commit d049533
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mevshare/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ func (m *API) SendBundle(ctx context.Context, bundle SendMevBundleArgs) (_ SendM
metrics.IncRPCCallFailure(SendBundleEndpointName)
return SendMevBundleResponse{}, ErrBackrunNotFound
}
if privacy := unmatchedBundle.Privacy; privacy == nil && privacy.Hints.HasHint(HintHash) {
if privacy := unmatchedBundle.Privacy; privacy == nil || !privacy.Hints.HasHint(HintHash) {
// if the unmatched bundle have not configured privacy or has not set the hash hint
// then we cannot backrun it
logger.Error("unmatched bundle has no hash hint", zap.String("hash", unmatchedHash.Hex()))
return SendMevBundleResponse{}, ErrBackrunInvalidBundle
}
bundle.Body[0].Bundle = unmatchedBundle
Expand Down

0 comments on commit d049533

Please sign in to comment.