Updates
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
require('bare-process/global')
|
||||
const EventEmitter = require('bare-events')
|
||||
|
||||
const PROTOCOL = 'bloom-gossip/v1'
|
||||
|
||||
class HyperP2PBloomGossip extends EventEmitter {
|
||||
constructor (opts = {}) {
|
||||
super()
|
||||
this.topic = opts.topic || null
|
||||
this._stats = { created: 0, errors: 0 }
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||
}
|
||||
|
||||
async ready () { return true }
|
||||
|
||||
_notImplemented (method) {
|
||||
this._stats.errors++
|
||||
throw new Error(`not implemented: scaffold (${method})`)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { HyperP2PBloomGossip, PROTOCOL }
|
||||
Reference in New Issue
Block a user