Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Receiving blocks, transactions and signatures from v1 lisk core - Closes #1081 #1083

Merged
merged 6 commits into from
Feb 8, 2019

Conversation

jondubois
Copy link

What was the problem?

Inbound messages such as blocks, transactions and signatures were not received.

How did I fix it?

Added legacy event handlers to handle the three legacy cases.

How to test it?

Run node on remote testnet.

Review checklist

@shuse2 shuse2 added this to Open PRs in Version 2.1.0 via automation Feb 7, 2019
@shuse2 shuse2 self-requested a review February 7, 2019 19:34
@@ -211,7 +237,11 @@ export class Peer extends EventEmitter {
isDiscoveredPeer: true,
};

this._peerDetailedInfo = newPeerInfo;
// Some fields from the main _peerInfo cannot be overridden.
this._peerDetailedInfo = {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe explicitly assigning what needs to be assign is more clear what cannot be overridden?

if (
packet.event === 'postBlock' ||
packet.event === 'postTransactions' ||
packet.event === 'postSignatures'
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe below, because lint is failing here

const legacyEvents = ['postBlock', 'postTransactions', 'postSignatures'];
if (legacyEvents.includes(packet.event))

@shuse2 shuse2 merged commit 66efe05 into development Feb 8, 2019
Version 2.1.0 automation moved this from Open PRs to Closed PRs Feb 8, 2019
@shuse2 shuse2 deleted the 1081-inbound_issues_v1 branch February 8, 2019 13:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Version 2.1.0
  
Closed PRs
Development

Successfully merging this pull request may close these issues.

None yet

2 participants