1
0
Files
electrum/tests
SomberNight 6d016d70ee synchronizer: rm redundant get_history call if new block mined unconf
This is an optimisation and possible hardening against traffic analysis.

After a new block is mined, we sometimes receive "blockchain.scripthash.subscribe" notifications. If so, this is often due to the just mined block including mempool txs we already knew about.

Normally we would call the "blockchain.scripthash.get_history" RPC, to get full history of the affected scripthash.
Instead now we first optimistically guess that all mempool txs touching this scripthash just got mined and see if by assuming that we can reproduce the announced sh status.
- if yes, we saved a network RTT by not having to call "blockchain.scripthash.get_history"
- if no, we request the history from the server using the RPC
2025-11-03 15:44:02 +00:00
..
2025-08-27 15:31:43 +02:00
2024-06-10 20:22:20 +00:00