@@ -346,7 +346,7 @@ class LightningRepo @Inject constructor(
346346 lightningService.sync()
347347 refreshChannelCache()
348348 syncState()
349- if (syncPending.get()) delay(SYNC_LOOP_DEBOUNCE_MS )
349+ if (syncPending.get()) delay(MS_SYNC_LOOP_DEBOUNCE )
350350 } while (syncPending.getAndSet(false ))
351351 } finally {
352352 _lightningState .update { it.copy(isSyncingWallet = false ) }
@@ -410,7 +410,7 @@ class LightningRepo @Inject constructor(
410410 }
411411
412412 val channelName = channel.inboundScidAlias?.toString()
413- ? : (channel.channelId.take(CHANNEL_ID_PREVIEW_LENGTH ) + " …" )
413+ ? : (channel.channelId.take(LENGTH_CHANNEL_ID_PREVIEW ) + " …" )
414414
415415 val closedAt = (System .currentTimeMillis() / 1000L ).toULong()
416416
@@ -922,7 +922,9 @@ class LightningRepo @Inject constructor(
922922 return @runCatching replacementTxId
923923 }.onFailure {
924924 Logger .error(
925- " bumpFeeByRbf error originalTxId: $originalTxId , satsPerVByte: $satsPerVByte " , it, context = TAG ,
925+ " bumpFeeByRbf error originalTxId: $originalTxId , satsPerVByte: $satsPerVByte " ,
926+ it,
927+ context = TAG ,
926928 )
927929 }
928930 }
@@ -959,25 +961,25 @@ class LightningRepo @Inject constructor(
959961 }
960962
961963 suspend fun estimateRoutingFees (bolt11 : String ): Result <ULong > = executeWhenNodeRunning(" estimateRoutingFees" ) {
962- Logger .info(" Estimating routing fees for bolt11: $bolt11 " )
964+ Logger .info(" Estimating routing fees for bolt11: $bolt11 " , context = TAG )
963965 lightningService.estimateRoutingFees(bolt11)
964966 .onSuccess {
965967 Logger .info(" Routing fees estimated: $it " , context = TAG )
966968 }
967969 .onFailure {
968- Logger .error(" Routing fees estimation failed " , it, context = TAG )
970+ Logger .error(" estimateRoutingFees error " , it, context = TAG )
969971 }
970972 }
971973
972974 suspend fun estimateRoutingFeesForAmount (bolt11 : String , amountSats : ULong ): Result <ULong > =
973975 executeWhenNodeRunning(" estimateRoutingFeesForAmount" ) {
974- Logger .info(" Estimating routing fees for amount: $amountSats " )
976+ Logger .info(" Estimating routing fees for amount: $amountSats " , context = TAG )
975977 lightningService.estimateRoutingFeesForAmount(bolt11, amountSats)
976978 .onSuccess {
977979 Logger .info(" Routing fees estimated: $it " , context = TAG )
978980 }
979981 .onFailure {
980- Logger .error(" Routing fees estimation failed " , it, context = TAG )
982+ Logger .error(" estimateRoutingFees error " , it, context = TAG )
981983 }
982984 }
983985
@@ -1006,8 +1008,8 @@ class LightningRepo @Inject constructor(
10061008
10071009 companion object {
10081010 private const val TAG = " LightningRepo"
1009- private const val CHANNEL_ID_PREVIEW_LENGTH = 10
1010- private const val SYNC_LOOP_DEBOUNCE_MS = 500L
1011+ private const val LENGTH_CHANNEL_ID_PREVIEW = 10
1012+ private const val MS_SYNC_LOOP_DEBOUNCE = 500L
10111013 }
10121014}
10131015
0 commit comments