Skip to content

Commit

Permalink
Merge pull request #324 from lidofinance/csm-fix
Browse files Browse the repository at this point in the history
take into account claimable shares from the previous reward trees
  • Loading branch information
iamnp authored Nov 27, 2024
2 parents 8f745f0 + a5babcd commit 64a5093
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/regression/test_csm.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ def ref_slot():
def distribute_reward_tree(node_operator, ref_slot):
consensus_version = contracts.cs_fee_oracle.getConsensusVersion()
oracle_version = contracts.cs_fee_oracle.getContractVersion()
claimable_shares = contracts.cs_fee_distributor.totalClaimableShares()

rewards = ETH(0.05)
oracle_report(cl_diff=rewards)
distributed_shares = contracts.lido.sharesOf(contracts.cs_fee_distributor)
distributed_shares = contracts.lido.sharesOf(contracts.cs_fee_distributor) - claimable_shares
assert distributed_shares > 0

report, report_hash, tree = prepare_csm_report({node_operator: distributed_shares}, ref_slot)
Expand Down

0 comments on commit 64a5093

Please sign in to comment.