src/levelDB.js
// Add data to levelDB with value
Add data to levelDB with value
Add data to levelDB with value
addDataToLevelDB(value) {
    let i = 0
    this.db.createReadStream().on('data', (data) => {
      i++
    }).on('error', err => console.log('Unable to read data stream!', err)).on('close', () => {
      console.log(`Block #${i}`)
      this.addLevelDBData(i, value)
    })
  }
addDataToLevelDB ( value ) { let i = 0 this . db . createReadStream ( ) . on ( 'data' , ( data ) => { i ++ } ) . on ( 'error' , err => console . log ( 'Unable to read data stream!' , err ) ) . on ( 'close' , ( ) => { console . log ( ` ${ i } ` ) this . addLevelDBData ( i , value ) } ) }
Add data to levelDB with value
Add data to levelDB with value