remove old mutable check from block.getSizes.
This commit is contained in:
parent
b04d4e3be1
commit
070af4643f
@ -130,8 +130,6 @@ Block.prototype.getRaw = function getRaw() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Block.prototype.getSizes = function getSizes() {
|
Block.prototype.getSizes = function getSizes() {
|
||||||
var sizes;
|
|
||||||
|
|
||||||
if (this._size != null) {
|
if (this._size != null) {
|
||||||
return {
|
return {
|
||||||
size: this._size,
|
size: this._size,
|
||||||
@ -147,14 +145,7 @@ Block.prototype.getSizes = function getSizes() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
sizes = bcoin.protocol.framer.block.sizes(this);
|
return bcoin.protocol.framer.block.sizes(this);
|
||||||
|
|
||||||
if (!this.mutable) {
|
|
||||||
this._size = sizes.size;
|
|
||||||
this._witnessSize = sizes.witnessSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
return sizes;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -213,6 +204,7 @@ Block.prototype.hasWitness = function hasWitness() {
|
|||||||
if (this.txs[i].hasWitness())
|
if (this.txs[i].hasWitness())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user