feat(p2p): information about feed

This commit is contained in:
Alexey Kasyanchuk 2018-07-18 11:33:25 +03:00
parent 8792da82d5
commit bd8921c186
2 changed files with 31 additions and 27 deletions

View File

@ -891,6 +891,10 @@ module.exports = async ({
// store torrent to feed
await feed.load()
Object.defineProperty(p2p.info, 'feed', {
enumerable: true,
get: () => feed.size()
});
p2pStore.on('store', async ({data: record, temp, myself}) => {
if(record.type !== 'vote')
return