@@ -27,6 +27,7 @@ func GetBlockIdxs(startHeight int64, arCli *goar.Client) (*BlockIdxs, error) {
27
27
// get block hash_list from gateway3
28
28
spiltList , err := GetBlockHashListByGateway3 (startHeight , endHeight )
29
29
if err != nil {
30
+ log .Error ("GetBlockHashListByGateway3(startHeight, endHeight)" , "err" , err )
30
31
// get block hash_list from trust node
31
32
spiltList , err = GetBlockHashList (arCli , startHeight , endHeight )
32
33
if err != nil {
@@ -84,6 +85,7 @@ func GetBlockHashList(arCli *goar.Client, startHeight, endHeight int64) ([]strin
84
85
}
85
86
// todo bug fix
86
87
spiltList := list [curHeight - endHeight : curHeight - startHeight + 1 ]
88
+ log .Debug ("success get block hash_list from arweave gateway" , "start" , startHeight , "end" , endHeight )
87
89
return spiltList , nil
88
90
}
89
91
@@ -127,6 +129,7 @@ func GetBlockHashListFromPeers(c *goar.Client, startHeight, endHeight int64, che
127
129
}
128
130
129
131
if successCount >= checkNum {
132
+ log .Debug ("success get block hash_list from peers" , "start" , startHeight , "end" , endHeight )
130
133
return spiltList , nil
131
134
}
132
135
if failedCount >= checkNum / 2 {
@@ -178,5 +181,6 @@ func GetBlockHashListByGateway3(startHeight, endHeight int64) ([]string, error)
178
181
if len (list ) != int (endHeight - startHeight + 1 ) {
179
182
return nil , errors .New ("get list incorrect" )
180
183
}
184
+ log .Debug ("success get block hash_list from gateway3." , "start" , startHeight , "end" , endHeight )
181
185
return list , nil
182
186
}
0 commit comments