Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Use PeerRecord value instead of pointer in EvtLocalPeerRecordUpdated #113

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

yusefnapora
Copy link
Contributor

Small update to #73 that changes the EvtLocalPeerRecordUpdated event struct so that it embeds a PeerRecord value, instead of a pointer to a PeerRecord. This prevents record from being modified by receivers.

@yusefnapora yusefnapora requested a review from raulk February 10, 2020 20:12
Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI fails because this is an interface-breaking change, which indeed it is.

@yusefnapora yusefnapora changed the title Embed peer record into event as value, not pointer Use PeerRecord value instead of pointer in EvtLocalPeerRecordUpdated Feb 10, 2020
@raulk
Copy link
Member

raulk commented Feb 10, 2020

nit: “embed” has a very specific meaning in go. In this case we’re not embedding the struct, we’re just changing the field type to a value instead of a pointer.

@yusefnapora yusefnapora merged commit 3f5306c into master Feb 10, 2020
@yusefnapora yusefnapora deleted the fix/peer-record-event branch February 10, 2020 20:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants