Skip to content

Guard missing peer addr in connect_dag assertions#798

Open
ashishkrshaw wants to merge 1 commit intobitcoin-dev-project:mainfrom
ashishkrshaw:fix/connect-dag-addr-guard
Open

Guard missing peer addr in connect_dag assertions#798
ashishkrshaw wants to merge 1 commit intobitcoin-dev-project:mainfrom
ashishkrshaw:fix/connect-dag-addr-guard

Conversation

@ashishkrshaw
Copy link

I noticed a small edge case in connect_dag.py: some peer entries can have a missing or null addr, and the current assertions can crash while splitting or substring checks. This change keeps behavior the same for valid data, but adds a safe fallback using d.get('addr') or '' for both DNS and IP assertions. Also fixed a typo in the error message from conectee to connectee.

@pinheadmz
Copy link
Contributor

Have you observed this error running the test locally or on our CI?
Why would the addr be null?

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