getForgerUrls function
Makes sure a list of next forgers includes the base API URL @param {Array} nextForgerUrls - Array of forger URLs that may or may not include the base API URL @returns nextForgerUrls - Array of next forgers that definitely includes the base API URL
Implementation
Set<String> getForgerUrls(Set<String> nextForgerUrls) {
return nextForgerUrls.contains(baseApiUrl)
? nextForgerUrls
: [...nextForgerUrls, baseApiUrl].toSet();
}