buildReplicaSetNodesToUserWalletsMap (nodeUsers) {
    const replicaSetNodesToUserWalletsMap = {}

    nodeUsers.forEach(userInfo => {
      const { wallet, primary, secondary1, secondary2 } = userInfo
      const replicaSet = [primary, secondary1, secondary2]

      replicaSet.forEach(node => {
        if (!replicaSetNodesToUserWalletsMap[node]) {
          replicaSetNodesToUserWalletsMap[node] = []
        }

        replicaSetNodesToUserWalletsMap[node].push(wallet)
      })
    })

    return replicaSetNodesToUserWalletsMap
  }
/**
   * Converts provided array of nodeUser info to issue to a map(replica set node => userWallets[]) for easier access
   *
   * @param {Array} nodeUsers array of objects with schema { user_id, wallet, primary, secondary1, secondary2 }
   * @returns {Object} map of replica set endpoint strings to array of wallet strings of users with that node as part of replica set
   */
Converts provided array of nodeUser info to issue to a map(replica set node => userWallets[]) for easier access
@param {Array} nodeUsers array of objects with schema { user_id, wallet, primary, secondary1, secondary2 }
@returns {Object} map of replica set endpoint strings to array of wallet strings of users with that node as part of replica set
Converts provided array of nodeUser info to issue to a map ( replica set node = > userWallets [] ) for easier access @param { Array } nodeUsers array of objects with schema { user_id wallet primary secondary1 secondary2 } @returns { Object } map of replica set endpoint strings to array of wallet strings of users with that node as part of replica set
buildReplicaSetNodesToUserWalletsMap (nodeUsers) {
    const replicaSetNodesToUserWalletsMap = {}
    nodeUsers.forEach(userInfo => {
      const { wallet, primary, secondary1, secondary2 } = userInfo
      const replicaSet = [primary, secondary1, secondary2]
      replicaSet.forEach(node => {
        if (!replicaSetNodesToUserWalletsMap[node]) {
          replicaSetNodesToUserWalletsMap[node] = []
        }
        replicaSetNodesToUserWalletsMap[node].push(wallet)
      })
    })
    return replicaSetNodesToUserWalletsMap
  }
buildReplicaSetNodesToUserWalletsMap ( nodeUsers ) { const replicaSetNodesToUserWalletsMap = { } nodeUsers . forEach ( userInfo => { const { wallet , primary , secondary1 , secondary2 } = userInfo const replicaSet = [ primary , secondary1 , secondary2 ] replicaSet . forEach ( node => { if ( ! replicaSetNodesToUserWalletsMap [ node ] ) { replicaSetNodesToUserWalletsMap [ node ] = [ ] } replicaSetNodesToUserWalletsMap [ node ] . push ( wallet ) } ) } ) return replicaSetNodesToUserWalletsMap }
Converts provided array of nodeUser info to issue to a map(replica set node => userWallets[]) for easier access
 @param {Array} nodeUsers array of objects with schema { user_id, wallet, primary, secondary1, secondary2 }
 @returns {Object} map of replica set endpoint strings to array of wallet strings of users with that node as part of replica set
Converts provided array of nodeUser info to issue to a map ( replica set node = > userWallets [] ) for easier access @param { Array } nodeUsers array of objects with schema { user_id wallet primary secondary1 secondary2 } @returns { Object } map of replica set endpoint strings to array of wallet strings of users with that node as part of replica set