B2: network profile for mainnet and regtest, explicit confirmation for mainnet (ADR-58, ELC-30)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3ee60a23da
commit
9c832fd3d2
16 files changed
+261
-36
No files matched your search
@@ -69,9 +69,13 @@ Le difese sono cinque.
|
||||
supererebbe ogni controllo sugli header di [ELC-11]; solo il genesis lo
|
||||
distingue. Un genesis diverso o assente, o un errore alla richiesta, fa
|
||||
fallire la connessione come un server irraggiungibile ([ELC-02]); vale anche
|
||||
per le connessioni del quorum ([ELC-14]).
|
||||
*Codice:* `plm_engine/electrum/client.py:ElectrumClient._check_genesis`, `plm_engine/network.py:GENESIS_HASH` ·
|
||||
*Test:* `tests/unit/test_electrum_client.py`
|
||||
per le connessioni del quorum ([ELC-14]). Il genesis atteso è quello del
|
||||
**profilo di rete** ([ADR-58](adr/ADR-58-alfa-su-regtest-profilo-di-rete-configurabile.md)):
|
||||
`000000000019d668…ce26f` per `mainnet`, `0f9188f1…2206` per `regtest`
|
||||
(`ElectrumClient(genesis_hash=…)`); il profilo fissa anche hrp, prefissi,
|
||||
`powLimit` e coin type, e l'hrp è quello con cui si validano gli indirizzi.
|
||||
*Codice:* `plm_engine/electrum/client.py:ElectrumClient._check_genesis`, `plm_engine/network.py:MAINNET`, `REGTEST` (profili) ·
|
||||
*Test:* `tests/unit/test_electrum_client.py`, `tests/django/test_network_profile.py::test_the_handshake_expects_the_genesis_of_its_profile`
|
||||
|
||||
## 2. Richieste con limite di tempo
|
||||
|
||||
|
||||
Reference in new issue
Block a user