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
Branch
merkle_root_user_dir
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26960
Build 53486: Build Diffelectrum-tests
Build 53485: arc lint + arc unit

Event Timeline

PiRK requested review of this revision.Feb 6 2024, 13:04
electrum/scripts/util.py
22

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