From e96e09493dc415847f70cd6e4563c8f661822ff4 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 17 Apr 2016 03:30:27 -0700 Subject: [PATCH] comments. --- lib/bcoin/compactblock.js | 1 + lib/bcoin/script.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/bcoin/compactblock.js b/lib/bcoin/compactblock.js index 73094a44..91131a77 100644 --- a/lib/bcoin/compactblock.js +++ b/lib/bcoin/compactblock.js @@ -54,6 +54,7 @@ function CompactBlock(data) { bcoin.abstractblock.call(this, data); + this.type = 'compactblock'; this.coinbaseHeight = -1; if (this.version >= 2) { diff --git a/lib/bcoin/script.js b/lib/bcoin/script.js index 8004eea5..c2804353 100644 --- a/lib/bcoin/script.js +++ b/lib/bcoin/script.js @@ -151,6 +151,12 @@ Witness.prototype.isScripthashInput = function isScripthashInput() { return Script.isScripthashInput(this.items, true); }; +/** + * "Guess" whether the witness is an unknown/non-standard type. + * This method is not 100% reliable. + * @returns {Boolean} + */ + Witness.prototype.isUnknownInput = function isUnknownInput() { return Script.isUnknownInput(this.items, true); }; @@ -2369,7 +2375,7 @@ Script.getInputType = function getInputType(code, isWitness) { }; /** - * "Guess" whether the input script is a scripthash input. + * "Guess" whether the input script is an unknown/non-standard type. * This method is not 100% reliable. * @returns {Boolean} */