@@ -107,7 +107,7 @@ type SnapshotEnd struct {
107107
108108type treeGeneratorImpl interface {
109109 generateTree (rp RewardsExecutionClient , networkName string , previousRewardsPoolAddresses []common.Address , bc RewardsBeaconClient ) (* GenerateTreeResult , error )
110- approximateStakerShareOfSmoothingPool (rp RewardsExecutionClient , networkName string , bc RewardsBeaconClient ) (* big.Int , error )
110+ approximateStakerShareOfSmoothingPool (rp RewardsExecutionClient , networkName string , previousRewardsPoolAddresses []common. Address , bc RewardsBeaconClient ) (* big.Int , error )
111111 getRulesetVersion () uint64
112112 // Returns the primary artifact cid for consensus, all cids of all files in a map, and any potential errors
113113 saveFiles (smartnode * config.SmartnodeConfig , treeResult * GenerateTreeResult , nodeTrusted bool ) (cid.Cid , map [string ]cid.Cid , error )
@@ -239,7 +239,7 @@ func (t *TreeGenerator) GenerateTree() (*GenerateTreeResult, error) {
239239}
240240
241241func (t * TreeGenerator ) ApproximateStakerShareOfSmoothingPool () (* big.Int , error ) {
242- return t .approximatorImpl .approximateStakerShareOfSmoothingPool (t .rp , fmt .Sprint (t .cfg .Smartnode .Network .Value ), t .bc )
242+ return t .approximatorImpl .approximateStakerShareOfSmoothingPool (t .rp , fmt .Sprint (t .cfg .Smartnode .Network .Value ), t .cfg . Smartnode . GetPreviousRewardsPoolAddresses (), t . bc )
243243}
244244
245245func (t * TreeGenerator ) GetGeneratorRulesetVersion () uint64 {
@@ -270,7 +270,7 @@ func (t *TreeGenerator) ApproximateStakerShareOfSmoothingPoolWithRuleset(ruleset
270270 return nil , fmt .Errorf ("ruleset v%d does not exist" , ruleset )
271271 }
272272
273- return info .generator .approximateStakerShareOfSmoothingPool (t .rp , fmt .Sprint (t .cfg .Smartnode .Network .Value ), t .bc )
273+ return info .generator .approximateStakerShareOfSmoothingPool (t .rp , fmt .Sprint (t .cfg .Smartnode .Network .Value ), t .cfg . Smartnode . GetPreviousRewardsPoolAddresses (), t . bc )
274274}
275275
276276func (t * TreeGenerator ) SaveFiles (treeResult * GenerateTreeResult , nodeTrusted bool ) (cid.Cid , map [string ]cid.Cid , error ) {
0 commit comments