@ -26,10 +26,12 @@ const (
lockPeriodInEpochs = 3 // This should be in sync with contracts/StakeLockContract.sol
)
// UpdateStakingList updates staking information by querying the staking smart contrac t.
// UpdateStakingList updates staking list from the given StakeInfo query resul t.
func ( node * Node ) UpdateStakingList ( stakeInfoReturnValue * structs . StakeInfoReturnValue ) {
if stakeInfoReturnValue == nil {
return
}
node . CurrentStakes = make ( map [ common . Address ] * structs . StakeInfo )
if stakeInfoReturnValue != nil {
for i , addr := range stakeInfoReturnValue . LockedAddresses {
blockNum := stakeInfoReturnValue . BlockNums [ i ]
lockPeriodCount := stakeInfoReturnValue . LockPeriodCounts [ i ]
@ -50,7 +52,6 @@ func (node *Node) UpdateStakingList(stakeInfoReturnValue *structs.StakeInfoRetur
}
}
}
}
}
func ( node * Node ) printStakingList ( ) {