minor fixes.
This commit is contained in:
parent
85dd0aa3a2
commit
d6e7ca0660
@ -46,6 +46,8 @@ Block.prototype.render = function render() {
|
||||
};
|
||||
|
||||
Block.prototype.renderNormal = function renderNormal() {
|
||||
this.getRaw();
|
||||
|
||||
if (!this._witnessSize)
|
||||
return this._raw;
|
||||
|
||||
|
||||
@ -355,7 +355,7 @@ Chain.prototype._preload = function _preload(callback) {
|
||||
if (lastEntry && entry.prevBlock !== lastEntry.hash) {
|
||||
start = Math.max(0, height - 2);
|
||||
stream.destroy();
|
||||
self.resetHeightAsync(start, function(e) {
|
||||
return self.resetHeightAsync(start, function(e) {
|
||||
if (e)
|
||||
throw e;
|
||||
return callback(new Error('Corrupt headers.'), start + 1);
|
||||
@ -367,7 +367,7 @@ Chain.prototype._preload = function _preload(callback) {
|
||||
if (!block.verifyHeaders()) {
|
||||
start = Math.max(0, height - 2);
|
||||
stream.destroy();
|
||||
self.resetHeightAsync(start, function(e) {
|
||||
return self.resetHeightAsync(start, function(e) {
|
||||
if (e)
|
||||
throw e;
|
||||
return callback(new Error('Bad headers.'), start + 1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user