diff --git a/lib/bcoin/bip151.js b/lib/bcoin/bip151.js index e92390b5..662813dc 100644 --- a/lib/bcoin/bip151.js +++ b/lib/bcoin/bip151.js @@ -202,8 +202,7 @@ BIP151Stream.prototype.getPublicKey = function getPublicKey() { BIP151Stream.prototype.encryptSize = function encryptSize(size) { var data = new Buffer(4); data.writeUInt32LE(size, 0, true); - this.chacha.encrypt(data); - return data; + return this.chacha.encrypt(data); }; /**