Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync whitelist #954

Merged
merged 2 commits into from Aug 29, 2019

Conversation

@pm47
Copy link
Member

commented Apr 18, 2019

We will only sync with whitelisted peers. If the whitelist is empty then we sync with everyone.

@codecov-io

This comment has been minimized.

Copy link

commented May 14, 2019

Codecov Report

Merging #954 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #954      +/-   ##
==========================================
+ Coverage   83.04%   83.04%   +<.01%     
==========================================
  Files         105      105              
  Lines        7842     7845       +3     
  Branches      313      325      +12     
==========================================
+ Hits         6512     6515       +3     
  Misses       1330     1330
Impacted Files Coverage Δ
...-core/src/main/scala/fr/acinq/eclair/io/Peer.scala 74.62% <100%> (-0.15%) ⬇️
...re/src/main/scala/fr/acinq/eclair/NodeParams.scala 84.84% <100%> (+0.15%) ⬆️
...clair/blockchain/electrum/ElectrumClientPool.scala 75.26% <0%> (-3.23%) ⬇️
...c/main/scala/fr/acinq/eclair/channel/Channel.scala 84.48% <0%> (+0.18%) ⬆️
...cinq/eclair/blockchain/bitcoind/zmq/ZMQActor.scala 94.87% <0%> (+5.12%) ⬆️
add a sync whitelist
We will only sync with whilelisted peer. If the whitelist is empty then
we sync with everyone.

@pm47 pm47 force-pushed the sync-whitelist branch from 400a7db to 219698e Aug 28, 2019

@pm47 pm47 marked this pull request as ready for review Aug 28, 2019

@pm47 pm47 requested a review from sstone Aug 28, 2019


import com.softwaremill.quicklens._
val aliceParams = TestConstants.Alice.nodeParams
.modify(_.syncWhitelist).setToIf(test.tags.contains("sync-whitelist-bob"))(Set(remoteNodeId))

This comment has been minimized.

Copy link
@t-bast

t-bast Aug 28, 2019

Member

nit: I would find this slightly better:

Suggested change
.modify(_.syncWhitelist).setToIf(test.tags.contains("sync-whitelist-bob"))(Set(remoteNodeId))
.modify(_.syncWhitelist).setToIf(test.tags.contains("sync-whitelist-bob"))(Set(Bob.nodeParams.nodeId))

This comment has been minimized.

Copy link
@pm47

pm47 Aug 28, 2019

Author Member

Problem is we reuse remoteNodeId a few lines below and it has to be the same value.

@pm47 pm47 dismissed stale reviews from sstone and t-bast via 1e041dc Aug 29, 2019

@t-bast
t-bast approved these changes Aug 29, 2019

@pm47 pm47 merged commit d67ba48 into master Aug 29, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@pm47 pm47 deleted the sync-whitelist branch Aug 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.