v1.24.4: nunca «sin gastar» sin pruebas — el historial debe contener la tx que creó la salida y la salida debe estar en /utxo; scripthash al estilo Esplora (sin invertir)

This commit is contained in:
2026-10-13 18:28:43 +00:00
parent e31bf85cbc
commit 34b1a13e17
5 changed files with 168 additions and 59 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ console.log("=== 1. Coste antes de comprobar ===\n");
const c = P.costeComprobacion(3);
ok("3 salidas: entre 3 y 24 consultas", c.min === 3 && c.max === 24 && /entre 3 y 24 consultas/.test(c.texto), c);
ok("1 salida: entre 1 y 8", /entre 1 y 8/.test(P.costeComprobacion(1).texto));
ok("el máximo es el de findSpendingTx (8 páginas)", P.PER_MAX_PAGINAS === 8);
ok("el máximo es el de estadoSalida (8 páginas)", P.PER_MAX_PAGINAS === 8);
const pend = P.salidasPorComprobar(X[P2], new Map());
ok("no se cobran consultas por el depósito en exchange ni por el polvo", pend.length === 1 && pend[0] === 1, pend);
ok("en el origen solo cuenta la salida robada", P.salidasPorComprobar(X[ROBO], new Map(), 0).length === 1);