(dataSources: BaseDataSource[])
| 294 | } |
| 295 | |
| 296 | export function getStartHeight(dataSources: BaseDataSource[]): number { |
| 297 | const startBlocksList = dataSources.map((item) => item.startBlock || 1); |
| 298 | if (startBlocksList.length === 0) { |
| 299 | throw new Error(`Failed to find a valid datasource, Please check your endpoint if specName filter is used.`); |
| 300 | } else { |
| 301 | return Math.min(...startBlocksList); |
| 302 | } |
| 303 | } |
no test coverage detected