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

Electrum improvements #1164

Merged
merged 3 commits into from
Jan 14, 2020
Merged

Electrum improvements #1164

merged 3 commits into from
Jan 14, 2020

Conversation

sstone
Copy link
Member

@sstone sstone commented Oct 4, 2019

  • electrum client: downgrade log level for some connection events from INFO to DEBUG
  • electrum watcher: don't ask for Merkle Proofs for unconfirmed txs (which by definition cannot exist)

@codecov-io
Copy link

codecov-io commented Oct 4, 2019

Codecov Report

Merging #1164 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1164      +/-   ##
==========================================
+ Coverage   77.12%   77.15%   +0.02%     
==========================================
  Files         142      142              
  Lines        9929     9930       +1     
  Branches      403      403              
==========================================
+ Hits         7658     7661       +3     
+ Misses       2271     2269       -2
Impacted Files Coverage Δ
...q/eclair/blockchain/electrum/ElectrumWatcher.scala 51.28% <100%> (-1.31%) ⬇️
...nq/eclair/blockchain/electrum/ElectrumClient.scala 73.28% <0%> (-0.37%) ⬇️
...src/main/scala/fr/acinq/eclair/router/Router.scala 92.97% <0%> (+0.68%) ⬆️
...clair/blockchain/electrum/ElectrumClientPool.scala 75.26% <0%> (+1.07%) ⬆️

@@ -92,7 +92,7 @@ class ElectrumClient(serverAddress: InetSocketAddress, ssl: SSL)(implicit val ec
})

// Start the client.
log.info("connecting to server={}", serverAddress)
log.debug("connecting to server={}", serverAddress)
Copy link
Member

Choose a reason for hiding this comment

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

Not convinced that hiding connection issues is the right thing to do.

@@ -867,7 +867,7 @@ object ElectrumWallet {
val confirmedBalance = confirmedReceived.map(_.amount).sum - confirmedSpents.map(_.amount).sum
val unconfirmedBalance = unconfirmedReceived.map(_.amount).sum - unconfirmedSpents.map(_.amount).sum

logger.debug(s"scriptHash=$scriptHash confirmedBalance=$confirmedBalance unconfirmedBalance=$unconfirmedBalance)")
logger.trace(s"scriptHash=$scriptHash confirmedBalance=$confirmedBalance unconfirmedBalance=$unconfirmedBalance)")
Copy link
Member

Choose a reason for hiding this comment

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

This is the only trace in the entire code base. Is it really such a special case that we need it here and not anywhere else?

@sstone sstone force-pushed the electrum-improvements branch from 15f76e0 to 5db67b4 Compare January 14, 2020 15:09
@sstone sstone merged commit 9579127 into master Jan 14, 2020
@sstone sstone deleted the electrum-improvements branch January 14, 2020 15:33
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.

4 participants