Skip to content

Commit

Permalink
Merge branch 'kishan/feat/secondary-slot-block-production' of github.…
Browse files Browse the repository at this point in the history
…com:ChainSafe/gossamer into kishan/feat/secondary-slot-block-production
  • Loading branch information
kishansagathiya committed Mar 4, 2022
2 parents e71b76d + bc775c6 commit 1a44de1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/babe/epoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func claimSlot(epochNumber uint64, slotNumber uint64, epochData *epochData, keyp
proof, err := claimSecondarySlotVRF(
epochData.randomness, slotNumber, epochNumber, epochData.authorities, keypair, epochData.authorityIndex)
if err != nil {
return nil, fmt.Errorf("error claim secondary vrf slot at %d: %w", slotNumber, err)
return nil, fmt.Errorf("cannot claim secondary vrf slot at %d: %w", slotNumber, err)
}
babeSecondaryVRFPreDigest := types.NewBabeSecondaryVRFPreDigest(
epochData.authorityIndex, slotNumber, proof.output, proof.proof)
Expand All @@ -268,12 +268,11 @@ func claimSlot(epochNumber uint64, slotNumber uint64, epochData *epochData, keyp
err = claimSecondarySlotPlain(
epochData.randomness, slotNumber, epochData.authorities, epochData.authorityIndex)
if err != nil {
return nil, fmt.Errorf("error claiming secondary plain slot at %d: %w", slotNumber, err)
return nil, fmt.Errorf("cannot claim secondary plain slot at %d: %w", slotNumber, err)
}

preRuntimeDigest, err := types.NewBabeSecondaryPlainPreDigest(
epochData.authorityIndex, slotNumber).ToPreRuntimeDigest()

if err != nil {
return nil, fmt.Errorf(
"failed to get preruntime digest from babe secondary plain predigest for slot %d: %w", slotNumber, err)
Expand Down

0 comments on commit 1a44de1

Please sign in to comment.