Page MenuHomePhabricator

[electrum] make get_merkle_root.py work on computers were Electrum ABC was never used
ClosedPublic

Authored by PiRK on Feb 6 2024, 13:04.

Details

Summary

When Electrum ABC is started for the first time, it creates its user data directory containing a certs directory where SSL certificates are stored. If this directory does not exist, it will fail to connect to servers that use self-signed certificates.

This diff makes the scripts work even if Electrum ABC was never used on a machine. This should fix the CI failure for the new "Update Electrum ABC checkpoints" CI task.

Depends on D15397

Test Plan
mv ~/.electrum-abc/certs/  ~/.electrum-abc/certs-bck
python scripts/get_merkle_root.py -vv
ls  ~/.electrum-abc/certs/

This fails before this diff, and now it works.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Feb 6 2024, 13:04
electrum/scripts/util.py
22 ↗(On Diff #45007)

make_dir creates the directory if is does not already exist. It is a no-op if it already exists.

bytesofman requested changes to this revision.Feb 6 2024, 13:49
bytesofman added a subscriber: bytesofman.

Depends on D15937

Seems like this is a typo? Prob D15397

This revision now requires changes to proceed.Feb 6 2024, 13:49
This revision is now accepted and ready to land.Feb 6 2024, 13:50