             nodes = res?.rows?.map (row) ->
                 row.node
             cb null, nodes
-
-exports.getListenerNodes = (listener, cb) ->
-    db.query "SELECT DISTINCT node FROM subscriptions WHERE listener=$1", [listener], (err, res) ->
-        cb err, res?.rows?.map (row) -> row.node
-
 
 LOST_TRANSACTION_TIMEOUT = 60 * 1000
 

            )
        ], cb

    getOwners: (node, cb) ->
        db = @db
        async.waterfall [(cb2) ->
            db.query "SELECT \"user\" FROM affiliations WHERE node=$1 AND affiliation='owner' ORDER BY updated DESC", [ node ], cb2
        , (res, cb2) ->
            cb2 null, res.rows.map((row) ->
                row.user
            )
        ], cb

    getOwnersByNodePrefix: (nodePrefix, cb) ->
        db = @db
        async.waterfall [(cb2) ->

    withNextDb (db) ->
        new Transaction(db, cb)

exports.nodeExists = (node, cb) ->
    withNextDb (db) ->
        db.query "SELECT node FROM nodes WHERE node=$1", [ node ], (err, res) ->
