@bitcoinerlab/discovery
Advanced tools
Comparing version 1.0.0 to 1.0.1
"use strict"; | ||
// TODO | ||
// | ||
// | ||
//fix getTxHex | ||
//fix getTxHex | ||
//fix getTxHex | ||
//fix getTxHex | ||
//fix getTxHex | ||
//fix getTxHex | ||
//fix getTxHex | ||
//fix getTxHex | ||
//fix getTxHex | ||
//fix getTxHex | ||
// | ||
// | ||
// Copyright (c) 2023 Jose-Luis Landabaso - https://bitcoinerlab.com | ||
@@ -137,8 +122,8 @@ // Distributed under the MIT software license | ||
let gap = 0; | ||
index = index || 0; //If it was a passed argument use it; othewise start at zero | ||
let indexEvaluated = index || 0; //If it was a passed argument use it; othewise start at zero | ||
const isRanged = descriptor.indexOf('*') !== -1; | ||
while (isRanged ? gap < gapLimit : index < 1 /*once if unranged*/) { | ||
while (isRanged ? gap < gapLimit : indexEvaluated < 1 /*once if unranged*/) { | ||
const used = await __classPrivateFieldGet(this, _Discovery_instances, "m", _Discovery_fetchOutput).call(this, { | ||
descriptor, | ||
...(isRanged ? { index } : {}) | ||
...(isRanged ? { index: indexEvaluated } : {}) | ||
}); | ||
@@ -153,3 +138,3 @@ if (used) { | ||
nextPromise = next(); | ||
index++; | ||
indexEvaluated++; | ||
if (used && onUsed && usedOutputNotified === false) { | ||
@@ -156,0 +141,0 @@ onUsed(descriptorOrDescriptors); |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/bitcoinerlab/discovery", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Jose-Luis Landabaso", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
108010
1791