This commit is contained in:
Alexey Kasyanchuk 2018-04-18 00:19:58 +03:00
parent 9e2dbcc84b
commit 3dd55ccc5b

View File

@ -41,10 +41,12 @@ module.exports = class P2PStore {
return return
// store // store
console.log('store record', record.id)
this._pushToDb(record) this._pushToDb(record)
}) })
this.p2p.on('dbSync', ({id} = {}, callback) => { this.p2p.on('dbSync', ({id} = {}, callback) => {
console.log('ask to sync db from', id, 'version')
if(!id || this.id <= id) if(!id || this.id <= id)
{ {
callback(false) callback(false)