Skip to content

Commit 9a01599

Browse files
add checkpoint test for the reward caller
1 parent c3d1256 commit 9a01599

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/unit/BondingManager.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6169,6 +6169,25 @@ describe("BondingManager", () => {
61696169
"caller must be a reward caller set by the transcoder"
61706170
)
61716171
})
6172+
6173+
it("should always checkpoint the reward recipient, not the RewardCaller", async () => {
6174+
await bondingManager
6175+
.connect(transcoder)
6176+
.setRewardCaller(nonTranscoder.address)
6177+
const rewardCallerTx = await bondingManager
6178+
.connect(nonTranscoder)
6179+
.rewardForTranscoder(transcoder.address)
6180+
6181+
await expectCheckpoints(fixture, rewardCallerTx, {
6182+
account: transcoder.address,
6183+
startRound: currentRound + 2,
6184+
bondedAmount: 1000,
6185+
delegateAddress: transcoder.address,
6186+
delegatedAmount: 2000,
6187+
lastClaimRound: currentRound,
6188+
lastRewardRound: currentRound + 1
6189+
})
6190+
})
61726191
})
61736192
})
61746193

0 commit comments

Comments
 (0)