Skip to content

refactor peer management#46

Merged
mnaamani merged 8 commits intoJoystreamClassic:developmentfrom
mnaamani:refactor-peer-management
May 26, 2017
Merged

refactor peer management#46
mnaamani merged 8 commits intoJoystreamClassic:developmentfrom
mnaamani:refactor-peer-management

Conversation

@mnaamani
Copy link
Copy Markdown
Collaborator

@mnaamani mnaamani commented May 22, 2017

  • Removed Peer/PeerPlugin/TorrentPlugin classes
  • Remove dependency on TorrentPluginAdded/Removed and PeerPluginAdded/Removed alerts
  • Refactored Session and Torrent classes
  • Removed start buying helper methods (because they depend on state)
  • Export commitmentToOutput method from payment channel
  • Update Examples
  • Update Unit Tests

@mnaamani mnaamani requested a review from bedeho May 22, 2017 14:18
Comment thread index.js
TorrentInfo: Libtorrent.TorrentInfo,
Session,
StateT
StateT,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

StateT is mentioned twice here. We can maybe only keep line 18 TORRENT_STATE: StateT ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes good point, I think I didn't wan't to totally break any code in electron app that was still depending on StateT, and would remove it after refactoring.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Better yet, the StateT.js itself should be removed, and have the native addon expose the enumerations for the torrent state, as we have done for other enumerations to make sure they are always correct if changed in c++

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR should expose the enumeration for the torrent state : JoystreamClassic/libtorrent-node#15
I have also change the method name to work with the standard that we are using encode/decode instead of createValue/fromValue old name.

@mnaamani mnaamani changed the title WIP - Refactor peer management refactor peer management May 26, 2017
@mnaamani mnaamani merged commit 6b246a1 into JoystreamClassic:development May 26, 2017
@mnaamani mnaamani deleted the refactor-peer-management branch July 30, 2017 21:45
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