-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LogPoller e2e test fixes #1046
LogPoller e2e test fixes #1046
Conversation
err := c.workers.Do(ctx, getBlockJobs[i]) | ||
if err != nil { | ||
return nil, fmt.Errorf("could not schedule job to fetch blocks for slot: %w", err) | ||
} | ||
} | ||
|
||
c.engine.Go(func(ctx context.Context) { | ||
go func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to cancel this goroutine if iteration gets aborted
@@ -38,7 +38,7 @@ func FuzzExtractorHappyPath(f *testing.F) { | |||
|
|||
stdDecoded, err := base64.StdEncoding.DecodeString(testString) | |||
if err == nil { | |||
require.Equal(t, stdDecoded[:8], extractor.Extract(testString)) | |||
require.Equal(t, [8]byte(stdDecoded[:8]), extractor.Extract(testString)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require.Equal(t, [8]byte(stdDecoded[:8]), extractor.Extract(testString)) | |
require.Equal(t, [discriminatorLength]byte(stdDecoded[:discriminatorLength]), extractor.Extract(testString)) |
refcount-- | ||
if refcount > 0 { | ||
fl.knownDiscriminators[discriminator] = refcount | ||
fl.knownDiscriminators[filter.EventSig] = refcount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're renaming filter.DiscriminatorRawBytes()
to filter.EventSig
, shouldn't we also rename fl.knownDiscriminators
to fl.knownEventSigs
?
if txIndex > 0 && txIndex < math.MaxInt32 && txLogIndex < math.MaxUint32 { | ||
return int64(txIndex<<32) | int64(txLogIndex), nil | ||
if txIndex >= 0 && txIndex < math.MaxInt32 && txLogIndex < math.MaxUint32 { | ||
return int64(txIndex<<32) | int64(txLogIndex), nil //nolint:gosec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, was the linter not complaining about this before and it just started?
result := make([]byte, v.Len()) | ||
l := v.Len() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
result := make([]byte, v.Len()) | |
l := v.Len() | |
l := v.Len() | |
result := make([]byte, l) | |
@@ -240,7 +253,15 @@ func newIndexedValue(typedVal any) (iVal IndexedValue, err error) { | |||
// any length array is fine as long as the element type is byte | |||
if t := v.Type(); t.Kind() == reflect.Array { | |||
if t.Elem().Kind() == reflect.Uint8 { | |||
return v.Bytes(), nil | |||
if v.CanAddr() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, interesting! Had to read up on this a bit just now to understand why this is necessary, but I think I get it.
Just had a few minor cosmetic suggestions, but I'll leave it up to you whether or not they're worth taking since we're on a tight schedule. |
|
core ref: 461d94af9431de5ee79447ab6972e3d2f64775fe
PR includes the following fixes: