Skip to content

Commit

Permalink
add number of peers
Browse files Browse the repository at this point in the history
  • Loading branch information
pdxwebdev committed Oct 20, 2018
1 parent 7b0472e commit a6b51e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yadacoin/peers.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ def from_dict(cls, config):

@classmethod
def to_dict(cls):
peers = [x.to_dict() for x in cls.peers]
return {
'peers': [x.to_dict() for x in cls.peers]
'num_peers': len(peers),
'peers': peers
}

class Peer(object):
Expand Down

0 comments on commit a6b51e2

Please sign in to comment.