memoriesadrift / tuw-cryptocurrencies-blockchain

Blockchain created for the Cryptocurrencies course at TU Wien
0 stars 0 forks source link

T1: Update Peer List #6

Closed memoriesadrift closed 1 year ago

memoriesadrift commented 1 year ago

Blocked by #4, #5

Description

Scope

  1. Send getpeers message after establishing a handshake
  2. Send peers message when receiving getpeers message from a known host
  3. Devise a policy on which nodes to connect to (should be more robust, akin to a final implementation, imo)
  4. Devise a method of choosing 30 peers to send if over 30 peers stored (can probably be a placeholder strategy for now)
memoriesadrift commented 1 year ago

1 and 2 are covered by #12, they were relatively trivial.

For 2. add the limitation of the message having to be received by a known (and handshaked) host and just implement 3. and 4.

memoriesadrift commented 1 year ago

Addition from re-read of spec:

A node should include itself in the list of peers at the first position if it is listening for incoming connections. Your node should always listen for and accept new incoming connections.