From 140eece7dd3d6daf399aba1a114205913d5b11ea Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 25 Aug 2017 20:54:56 -0700 Subject: [PATCH] script: improve perf of getScripthash. --- lib/script/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/script/script.js b/lib/script/script.js index dd405fe8..c5a10d61 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -2025,7 +2025,7 @@ Script.prototype.getScripthash = function getScripthash() { if (!this.isScripthash()) return null; - return this.raw.slice(2, 22); + return this.getData(1); }; /**