Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function migrate () {
// actual upgrade
pull(
db.createLogStream({gt: since}),
paramap(function (data, cb) {
prog.current += 1
flumedb.rawAppend(data, cb)
}, 32),
pull.drain(null, ready)
)
}
}
function init (sbs, n, cb) {
var keys = ecc.generate(ecc.curves.k256)
var f = sbs.feed(keys)
pull(
pull.values(rand(n)),
pull.asyncMap(function (r, cb) {
f.append(MESSAGE, ''+r, cb)
}),
pull.drain(null, function (err) {
if(err) return cb(err)
f.verify(cb)
})
)
return keys
}
function init (sbs, n, cb) {
var keys = ecc.generate(ecc.curves.k256)
var f = sbs.feed(keys)
pull(
pull.values(rand(n)),
pull.asyncMap(function (r, cb) {
f.append(MESSAGE, ''+r, cb)
}),
pull.drain(null, function (err) {
if(err) return cb(err)
f.verify(cb)
})
)
return f
}
scuttlebutt.feed(keys).verify(function (err) {
if(err) throw err
stream = exports[command](config._, config, done)
if(stream)
pull(stream, pull.through(console.log), pull.drain(null, done))
})
}
db.createWriteStream = function (cb) {
return pull(
paramap(function (data, cb) {
db.add(data, cb)
}),
pull.drain(null, cb)
)
}