Allow for custom channel sizes in LndRpcTestUtil.createNodePair (#4398)

This commit is contained in:
benthecarman 2022-06-16 19:36:03 -05:00 committed by GitHub
parent 3154362f1a
commit a0ab0638f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,10 @@ trait LndRpcTestUtil extends Logging {
/** Creates two Lnd nodes that are connected together and returns their
* respective [[org.bitcoins.lnd.rpc.LndRpcClient LndRpcClient]]s
*/
def createNodePair(bitcoind: BitcoindRpcClient)(implicit
def createNodePair(
bitcoind: BitcoindRpcClient,
channelSize: CurrencyUnit = DEFAULT_CHANNEL_AMT,
channelPushAmt: CurrencyUnit = DEFAULT_CHANNEL_AMT / Satoshis(2))(implicit
ec: ExecutionContext): Future[(LndRpcClient, LndRpcClient)] = {
val actorSystemA =
@ -255,7 +258,11 @@ trait LndRpcTestUtil extends Logging {
_ <- AsyncUtil.awaitConditionF(() => isSynced)
_ <- AsyncUtil.awaitConditionF(() => isFunded)
_ <- openChannel(bitcoind, client, otherClient)
_ <- openChannel(bitcoind = bitcoind,
n1 = client,
n2 = otherClient,
amt = channelSize,
pushAmt = channelPushAmt)
} yield (client, otherClient)
}