Fixed event name.

This commit is contained in:
Chris Kleeschulte 2017-01-30 14:21:22 -05:00
parent 4b51bc0143
commit 8511e2f31b

View File

@ -52,7 +52,7 @@ Sync.prototype.initialSync = function() {
};
// Get concurrent and serial block operations and write them together block by block
// Useful for when we are fully synced and we want to advance the concurrentTip and
// Useful for when we are fully synced and we want to advance the concurrentTip and
// the tip together
Sync.prototype.sync = function() {
if(this.syncing) {
@ -255,7 +255,7 @@ ProcessSerial.prototype._write = function(block, enc, callback) {
return self._process(block, callback);
}
self.db.once('concurrentblock', function() {
self.db.once('concurrentaddblock', function() {
if(!check()) {
var err = new Error('Concurrent block ' + self.db.concurrentTip.__height + ' is less than ' + block.__height);
return self.emit('error', err);
@ -383,4 +383,4 @@ WriteStream.prototype._write = function(obj, enc, callback) {
});
};
module.exports = Sync;
module.exports = Sync;