-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix Drand fetching around null tipsets #7376
Conversation
@@ -1037,81 +1035,6 @@ func TestSyncCheckpointEarlierThanHead(t *testing.T) { | |||
require.True(tu.t, p1Head.Equals(b.TipSet())) | |||
} | |||
|
|||
func TestDrandNull(t *testing.T) { |
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.
This test was pretty bad...better test in rand_test now that also covers this case
4df6157
to
9773391
Compare
Codecov Report
@@ Coverage Diff @@
## feat/nv14 #7376 +/- ##
=============================================
- Coverage 39.29% 39.22% -0.07%
=============================================
Files 627 627
Lines 66099 66129 +30
=============================================
- Hits 25971 25940 -31
- Misses 35643 35706 +63
+ Partials 4485 4483 -2
Continue to review full report at Codecov.
|
9773391
to
76da461
Compare
chain/store/rand.go
Outdated
func (cs *ChainStore) ExtractBeaconEntryForRound(ts *types.TipSet, round uint64) (*types.BeaconEntry, error) { | ||
cbe := ts.Blocks()[0].BeaconEntries | ||
for _, v := range cbe { | ||
if v.Round == round { |
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.
You are passing ChainEpoch as round and comparing it with Drand round.
d3652f0
to
21bb0e7
Compare
return cs.LoadTipSet(tsk) | ||
} | ||
|
||
func (cs *ChainStore) GetLatestBeaconEntry(ts *types.TipSet) (*types.BeaconEntry, error) { |
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.
This could be in the new stateRand instead, doesn't really make a difference
95f1fa9
to
6cedfbb
Compare
6cedfbb
to
c3c46e9
Compare
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.
Post-merge lgtm
Closes #3613