addLevelDBData (key, value) {
    return new Promise((resolve, reject) => {
      db.put(key, value, (err) => {
        if (err) {
          console.log('Block ' + key + ' submission failed', err)
          reject(err)
        }
        else {
          console.log('Block #' + key + ' stored')
          resolve(value)
        }
      })
    })
  }
// Add data to levelDB with key/value pair
Add data to levelDB with key/value pair
Add data to levelDB with key / value pair
addLevelDBData (key, value) {
    return new Promise((resolve, reject) => {
      db.put(key, value, (err) => {
        if (err) {
          console.log('Block ' + key + ' submission failed', err)
          reject(err)
        }
        else {
          console.log('Block #' + key + ' stored')
          resolve(value)
        }
      })
    })
  }
addLevelDBData ( key , value ) { return new Promise ( ( resolve , reject ) => { db . put ( key , value , ( err ) => { if ( err ) { console . log ( 'Block ' + key + ' submission failed' , err ) reject ( err ) } else { console . log ( 'Block #' + key + ' stored' ) resolve ( value ) } } ) } ) }
Add data to levelDB with key/value pair
Add data to levelDB with key / value pair