@@ -59,7 +59,7 @@ func GetFinalityVotesByHeight(c common.CommonClient, height int64) ([]string, er
5959 return votes .BTCPKs , nil
6060}
6161
62- func GetBabylonFinalityProviderInfos (c common.CommonClient ) ([]types.FinalityProviderInfo , error ) {
62+ func GetBabylonFinalityProviderInfos (c common.CommonClient , chainID string ) ([]types.FinalityProviderInfo , error ) {
6363 ctx , cancel := context .WithTimeout (context .Background (), common .Timeout )
6464 defer cancel ()
6565
@@ -68,7 +68,7 @@ func GetBabylonFinalityProviderInfos(c common.CommonClient) ([]types.FinalityPro
6868 maxCnt := 10
6969 key := ""
7070 for cnt := 0 ; cnt <= maxCnt ; cnt ++ {
71- resp , err := requester .Get (types .BabylonFinalityProviderInfosQueryPath (key ))
71+ resp , err := requester .Get (types .BabylonFinalityProviderInfosQueryPath (key , chainID ))
7272 if err != nil {
7373 return nil , errors .Errorf ("rpc call is failed from %s: %s" , resp .Request .URL , err )
7474 }
@@ -86,7 +86,7 @@ func GetBabylonFinalityProviderInfos(c common.CommonClient) ([]types.FinalityPro
8686
8787 if fpInfos .Pagination .NextKey != "" {
8888 key = url .QueryEscape (fpInfos .Pagination .NextKey )
89- c .Debugf ("there is next key, keep collecting finality providers by using this path: %s" , types .BabylonFinalityProviderInfosQueryPath (key ))
89+ c .Debugf ("there is next key, keep collecting finality providers by using this path: %s" , types .BabylonFinalityProviderInfosQueryPath (key , chainID ))
9090 } else {
9191 // got all finality provider infos
9292 c .Debugf ("collected all finality providers" )
0 commit comments