Skip to content

test: narrow BlockchainIdentities routing test to exact shared-path variant#556

Merged
lklimek merged 2 commits intofeat/blockchain-identities-account-typefrom
copilot/sub-pr-554-again
Mar 16, 2026
Merged

test: narrow BlockchainIdentities routing test to exact shared-path variant#556
lklimek merged 2 commits intofeat/blockchain-identities-account-typefrom
copilot/sub-pr-554-again

Conversation

Copy link

Copilot AI commented Mar 16, 2026

The test test_normal_payment_to_identity_address_not_detected had two problems: its name contradicted the actual expected behavior (payment is detected), and it accepted any BlockchainIdentities* variant, which would pass even if routing hit the wrong account type.

Changes

  • Rename test to test_normal_payment_to_identity_registration_shared_path_detected_via_blockchain_identities_ecdsa_hash160
  • Narrow assertion from a broad OR across all four BlockchainIdentities* variants to exclusively BlockchainIdentitiesECDSAHash160 — the only variant that actually shares the m/9'/coinType'/5'/1' derivation path (subfeature=1) with identity registration
// Before: passes even if routing picks the wrong BlockchainIdentities account
assert!(
    result.affected_accounts.iter().any(|acc| matches!(
        acc.account_type_match.to_account_type_to_check(),
        AccountTypeToCheck::BlockchainIdentitiesECDSA
            | AccountTypeToCheck::BlockchainIdentitiesECDSAHash160
            | AccountTypeToCheck::BlockchainIdentitiesBLS
            | AccountTypeToCheck::BlockchainIdentitiesBLSHash160
    )),
);

// After: pinned to the exact variant sharing m/9'/coinType'/5'/1'
assert!(
    result.affected_accounts.iter().any(|acc| matches!(
        acc.account_type_match.to_account_type_to_check(),
        AccountTypeToCheck::BlockchainIdentitiesECDSAHash160
    )),
);

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…160 shared-path variant

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 16, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/dashpay/rs-x11-hash/commits/0.1.9
    • Triggering command: /home/REDACTED/.rustup/toolchains/1.92.0-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/1.92.0-x86_64-REDACTED-linux-gnu/bin/cargo test -p key-wallet --all-features -- transaction_router (http block)
  • https://api.github.com/repos/dashpay/vsss-rs/commits/main
    • Triggering command: /home/REDACTED/.rustup/toolchains/1.92.0-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/1.92.0-x86_64-REDACTED-linux-gnu/bin/cargo test -p key-wallet --all-features -- transaction_router (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] [WIP] Address feedback on BlockchainIdentities account type implementation test: narrow BlockchainIdentities routing test to exact shared-path variant Mar 16, 2026
Copilot AI requested a review from lklimek March 16, 2026 17:27
@lklimek lklimek marked this pull request as ready for review March 16, 2026 17:41
@lklimek lklimek merged commit 80b3bd3 into feat/blockchain-identities-account-type Mar 16, 2026
@lklimek lklimek deleted the copilot/sub-pr-554-again branch March 16, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants