Skip to content

Commit

Permalink
Fix missing pass of expectedEpoch to committee API call
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed May 8, 2024
1 parent eb2da31 commit 8055580
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tools/docker-network/tests/dockertestframework/asserts.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ func (d *DockerTestFramework) AssertCommittee(expectedEpoch iotago.EpochIndex, e
testAPI := d.defaultWallet.Client.CommittedAPI()
expectedSlotStart := testAPI.TimeProvider().EpochStart(expectedEpoch)

// the expected slot needs to be at least now or in the future, otherwise we can't wait for it and get wrong results
require.GreaterOrEqual(d.Testing, expectedSlotStart, status.LatestAcceptedBlockSlot)

if status.LatestAcceptedBlockSlot < expectedSlotStart {
slotToWait := expectedSlotStart - status.LatestAcceptedBlockSlot
secToWait := time.Duration(slotToWait) * time.Duration(testAPI.ProtocolParameters().SlotDurationInSeconds()) * time.Second
Expand All @@ -89,7 +86,7 @@ func (d *DockerTestFramework) AssertCommittee(expectedEpoch iotago.EpochIndex, e

d.Eventually(func() error {
for _, node := range d.Nodes() {
resp, err := d.Client(node.Name).Committee(context.TODO())
resp, err := d.Client(node.Name).Committee(context.TODO(), expectedEpoch)
if err != nil {
return err
}
Expand Down

0 comments on commit 8055580

Please sign in to comment.