memblock: optimizations.

This commit is contained in:
Christopher Jeffrey 2016-07-30 13:44:18 -07:00
parent a03465632a
commit 0343140f0a
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -175,6 +175,8 @@ MemBlock.prototype.toRaw = function toRaw() {
MemBlock.prototype.toBlock = function toBlock() {
var block = bcoin.block.fromRaw(this.raw);
block._hash = this._hash;
block._cbHeight = this.coinbaseHeight;
this.raw = null;
return block;
};