async updateEndpointToSpIdMap (ethContracts) {
    let endpointToSPIdMap = {}
    try {
      const contentNodes = await ethContracts.getServiceProviderList('content-node')
      contentNodes.forEach(cn => { endpointToSPIdMap[cn.endpoint] = cn.spID })
    } catch (e) {
      this.logError(`[updateEndpointToSpIdMap]: ${e.message}`)
    }

    if (Object.keys(endpointToSPIdMap).length > 0) this.endpointToSPIdMap = endpointToSPIdMap
    if (Object.keys(this.endpointToSPIdMap).length === 0) {
      const errorMsg = '[updateEndpointToSpIdMap]: Unable to initialize this.endpointToSPIdMap'
      this.logError(errorMsg)
      throw new Error(errorMsg)
    }
  }
/**
   * Updates `this.endpointToSPIdMap` to the mapping of <endpoint : spId>. If the fetch fails, rely on the previous
   * `this.endpointToSPIdMap` value. If the existing map is empty, throw error as we need this map to issue reconfigs.
   * @param {Object} ethContracts audiusLibs.ethContracts instance; has helper fn to get service provider info
   */
Updates `this.endpointToSPIdMap` to the mapping of . If the fetch fails, rely on the previous
`this.endpointToSPIdMap` value. If the existing map is empty, throw error as we need this map to issue reconfigs.
@param {Object} ethContracts audiusLibs.ethContracts instance; has helper fn to get service provider info
Updates ` this . endpointToSPIdMap ` to the mapping of . If the fetch fails rely on the previous ` this . endpointToSPIdMap ` value . If the existing map is empty throw error as we need this map to issue reconfigs . @param { Object } ethContracts audiusLibs . ethContracts instance ; has helper fn to get service provider info
async updateEndpointToSpIdMap (ethContracts) {
    let endpointToSPIdMap = {}
    try {
      const contentNodes = await ethContracts.getServiceProviderList('content-node')
      contentNodes.forEach(cn => { endpointToSPIdMap[cn.endpoint] = cn.spID })
    } catch (e) {
      this.logError(`[updateEndpointToSpIdMap]: ${e.message}`)
    }
    if (Object.keys(endpointToSPIdMap).length > 0) this.endpointToSPIdMap = endpointToSPIdMap
    if (Object.keys(this.endpointToSPIdMap).length === 0) {
      const errorMsg = '[updateEndpointToSpIdMap]: Unable to initialize this.endpointToSPIdMap'
      this.logError(errorMsg)
      throw new Error(errorMsg)
    }
  }
async updateEndpointToSpIdMap ( ethContracts ) { let endpointToSPIdMap = { } try { const contentNodes = await ethContracts . getServiceProviderList ( 'content-node' ) contentNodes . forEach ( cn => { endpointToSPIdMap [ cn . endpoint ] = cn . spID } ) } catch ( e ) { this . logError ( ` ${ e . message } ` ) } if ( Object . keys ( endpointToSPIdMap ) . length > 0 ) this . endpointToSPIdMap = endpointToSPIdMap if ( Object . keys ( this . endpointToSPIdMap ) . length === 0 ) { const errorMsg = '[updateEndpointToSpIdMap]: Unable to initialize this.endpointToSPIdMap' this . logError ( errorMsg ) throw new Error ( errorMsg ) } }
Updates `this.endpointToSPIdMap` to the mapping of <endpoint : spId>.
Updates ` this . endpointToSPIdMap ` to the mapping of <endpoint : spId > .