iri icon indicating copy to clipboard operation
iri copied to clipboard

send heartbeat pulses and request tx using heartbeat

Open acha-bill opened this issue 4 years ago • 0 comments

Description

Adds a new thread that sends heartbeat messages to neighbours every minute. Then it requests txs only from neighbours who have the tx by checking their first and last solid milestone index from the heartbeat. If the neighbour does not support protocol v2 yet, we request from it anyways.

Fixes #1798

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How Has This Been Tested?

Add unit tests that check that txs are broadcasted only from neighbors according to their heartbeat.

Checklist:

  • [x] My code follows the style guidelines for this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes

acha-bill avatar Apr 08 '20 00:04 acha-bill