Page MenuHomePhabricator

[electrum] fix a few derivation path quirks in testnet mode
ClosedPublic

Authored by PiRK on Sep 24 2025, 09:44.

Details

Summary

When running in testnet mode, the long information message about the choice of derivation paths when creating a new wallet is irrelevant. So don't print it.

Also hardcode the paths in the derivation path scanner. The bip44_derivation_* functions check for testnet mode to decide which path to return, and in testnet mode they all return the same path. So we ended up scanning the m/44'/1'/0' path 3 times and we don't scan for the 899', the 145' and the 0' paths. Also in mainnet mode we never scanned the tesnet path. Always scan all of these paths.

Test Plan

./electrum-abc --testnet
Restore a wallet from seed. Try the derivation path scanner.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
elec_derivation_path
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34558
Build 68583: Build Diffelectrum-tests · electrum-functional-tests
Build 68582: arc lint + arc unit

Event Timeline

PiRK requested review of this revision.Sep 24 2025, 09:44
electrum/electrumabc/base_wizard.py
488–498

These messages are confusing, it sounds like it is about address formats (especially the "legacy" word). But that's unrelated to this diff, might improve it in a follow-up if i can think of a better phrasing.

This revision is now accepted and ready to land.Sep 24 2025, 10:31