From 76348d8b0526c26aa78edec8230938c786d0a082 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 9 Oct 2019 11:09:05 +0700 Subject: [PATCH] TODO: Cache the derived node for quick perf gain --- src/key-formats/xpub.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/key-formats/xpub.js b/src/key-formats/xpub.js index 20bb157..ed38d01 100644 --- a/src/key-formats/xpub.js +++ b/src/key-formats/xpub.js @@ -3,6 +3,7 @@ const bitcoin = require('bitcoinjs-lib'); const generateXpubKey = ({attempts, xpub}) => { const index = attempts - 1; + // TODO: Cache the derived node for quick perf gain const node = bitcoin.bip32.fromBase58(xpub); const {publicKey} = node.derive(index);