Hide private variables
This commit is contained in:
parent
f089fb5424
commit
b8be2a234f
|
@ -154,9 +154,9 @@ internal class BlockingLightWalletClientImpl private constructor(
|
||||||
channel = channelFactory.newChannel(lightWalletEndpoint)
|
channel = channelFactory.newChannel(lightWalletEndpoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
// test code
|
// These make the implementation of BlockingLightWalletClientImpl not thread-safe.
|
||||||
internal var stateCount = 0
|
private var stateCount = 0
|
||||||
internal var state: ConnectivityState? = null
|
private var state: ConnectivityState? = null
|
||||||
private fun requireChannel(): ManagedChannel {
|
private fun requireChannel(): ManagedChannel {
|
||||||
state = channel.getState(false).let { new ->
|
state = channel.getState(false).let { new ->
|
||||||
if (state == new) stateCount++ else stateCount = 0
|
if (state == new) stateCount++ else stateCount = 0
|
||||||
|
|
|
@ -154,9 +154,10 @@ internal class CoroutineLightWalletClientImpl private constructor(
|
||||||
channel = channelFactory.newChannel(lightWalletEndpoint)
|
channel = channelFactory.newChannel(lightWalletEndpoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
// test code
|
// These make the CoroutineLightWalletClientImpl not thread safe. In the long-term, we should
|
||||||
internal var stateCount = 0
|
// consider making it thread safe.
|
||||||
internal var state: ConnectivityState? = null
|
private var stateCount = 0
|
||||||
|
private var state: ConnectivityState? = null
|
||||||
private fun requireChannel(): ManagedChannel {
|
private fun requireChannel(): ManagedChannel {
|
||||||
state = channel.getState(false).let { new ->
|
state = channel.getState(false).let { new ->
|
||||||
if (state == new) stateCount++ else stateCount = 0
|
if (state == new) stateCount++ else stateCount = 0
|
||||||
|
|
Loading…
Reference in New Issue