Skip to content

Commit

Permalink
sort obs_gossip_peers (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckegg authored Feb 6, 2017
1 parent edabe8b commit ef1aeb9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules_extra/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,14 @@ function obs_gossip_peers (api) {
})

refresh()

var sortedIds = computed([state], (state) => {
Object.keys(state).sort((a, b) => {
return peerListSort(state[a], state[b])
})
})

return dictToCollection.values(state)
return mutantMap(sortedIds, state.get)

function refresh () {
api.sbot_gossip_peers((err, peers) => {
Expand Down

0 comments on commit ef1aeb9

Please sign in to comment.