-
Notifications
You must be signed in to change notification settings - Fork 332
feat: update some logic and add more tests based on #216 #228
Conversation
|
||
stateVars, err := s.rpc.GetProtocolStateVariables(nil) | ||
if err != nil { | ||
return fmt.Errorf("failed to get state variables: %w", err) | ||
} | ||
|
||
for { | ||
if blockId.Cmp(big.NewInt(0)) == 0 { | ||
lastKnownGoodBlockId = new(big.Int).SetUint64(0) | ||
if blockId == nil && blockId.Cmp(common.Big0) == 0 { |
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.
blockId cant be both nil, and compared to 0? it should be ||
perhaps?
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.
changed to init blockID
with current L2 head, and also changed && to ||
Codecov Report
@@ Coverage Diff @@
## handle_reorg #228 +/- ##
================================================
+ Coverage 50.67% 54.43% +3.76%
================================================
Files 36 36
Lines 3576 3525 -51
================================================
+ Hits 1812 1919 +107
+ Misses 1525 1353 -172
- Partials 239 253 +14
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
No description provided.