v1.43.0: salidas, entradas y direcciones se numeran desde 0, como Bitcoin Core, Sparrow y Mempool
«salida i» y «entrada i» con el índice real en pantalla, informes, PSBT y ayuda (sin «2.ª salida (vout 1)»); nota «se cuentan desde 0» en los encabezados; «recepción 0» en la wallet; «vout» en el glosario. tests/test31.js; test8, test11 y test23 ajustadas. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5npnUYgSPkAaHkdaeUqBr
This commit is contained in:
+3
-3
@@ -22,7 +22,7 @@
|
||||
// Mempool no devuelve);
|
||||
// 6. la frase bajo la nota decía «ninguno decisivo» con fallos CERTEZA.
|
||||
//
|
||||
// Peritaje siguiendo la salida 1 (P2PK, a Hal), vistos en la v1.24.2:
|
||||
// Peritaje siguiendo la salida 0 (P2PK, a Hal), vistos en la v1.24.2:
|
||||
// 7. una salida sin dirección se trataba como «datos, no dinero»;
|
||||
// 8. el reparto en el origen dividía por el total de la tx (20 % y no 100 %);
|
||||
// 9. sin dirección no se buscaba el gasto: ahora se pregunta por scripthash
|
||||
@@ -141,9 +141,9 @@ ok("2. ...y lo dice: no distingue cuál es el pago", () => /no distingue/.test(c
|
||||
ok("3. P2PK es formato antiguo", () => ck(A, "legacy_type").pass === false && ck(A, "legacy_type").certainty === "CERTEZA", () => ck(A, "legacy_type"));
|
||||
ok("3. la etiqueta no habla solo de «direcciones 1… o 3…»", () => /clave pública/.test(ck(A, "legacy_type").label), () => ck(A, "legacy_type").label);
|
||||
const cgA = T.guessChangeOutput ? T.guessChangeOutput(TX_A, false) : {};
|
||||
ok("4. el cambio vuelve a la misma clave: identificable, salida 2 (vout 1)", () => cgA.identifiable && cgA.index === 1, cgA);
|
||||
ok("4. el cambio vuelve a la misma clave: identificable, salida 1", () => cgA.identifiable && cgA.index === 1, cgA);
|
||||
ok("4. ...con CERTEZA", () => cgA.certainty === "CERTEZA" && ck(A, "change_detection").certainty === "CERTEZA", () => [cgA.certainty, ck(A, "change_detection").certainty]);
|
||||
ok("4. la comprobación del cambio falla y dice «2.ª salida»", () => ck(A, "change_detection").pass === false && /2\.ª salida/.test(ck(A, "change_detection").detail));
|
||||
ok("4. la comprobación del cambio falla y dice «salida 1»", () => ck(A, "change_detection").pass === false && /salida 1\b/.test(ck(A, "change_detection").detail));
|
||||
ok("4. en un pago por lotes con la misma clave, también", () => T.guessChangeOutput({ ...TX_A, vout: [TX_A.vout[0], { ...p2pk(HAL.replace("04ae", "04af")), value: 1 }, TX_A.vout[1]] }, false).index === 2);
|
||||
ok("la vista nombra la salida sin dirección", () => /clave pública/.test(T.etiquetaSinDir(TX_A.vout[0])));
|
||||
ok("rastro: la entrada viene de un minado (coinbase del bloque 9)", () => T.pistasEntrada(TX_A.vin[0], BLOQUE9).some(p => p.tipo === "coinbase" && p.certeza === "CERTEZA"));
|
||||
|
||||
Reference in New Issue
Block a user