itest: deprecate deriveFundingShim

This commit is contained in:
yyforyongyu 2022-07-25 19:01:34 +08:00
parent 359a5638f5
commit 85210b947f
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868
3 changed files with 7 additions and 6 deletions

View File

@ -1077,7 +1077,7 @@ func testChanRestoreScenario(t *harnessTest, net *lntest.NetworkHarness,
require.NoError(t.t, err)
thawHeight := uint32(minerHeight + 144)
fundingShim, _, _ = deriveFundingShim(
fundingShim, _, _ = deriveFundingShimOld(
net, t, from, to, chanAmt, thawHeight, true,
)
}

View File

@ -505,7 +505,7 @@ func testExternalFundingChanPoint(net *lntest.NetworkHarness, t *harnessTest) {
// a transaction that will never be published.
const thawHeight uint32 = 10
const chanSize = funding.MaxBtcFundingAmount
fundingShim1, chanPoint1, _ := deriveFundingShim(
fundingShim1, chanPoint1, _ := deriveFundingShimOld(
net, t, carol, dave, chanSize, thawHeight, false,
)
_ = openChannelStream(
@ -521,7 +521,7 @@ func testExternalFundingChanPoint(net *lntest.NetworkHarness, t *harnessTest) {
// externally funded, we should still be able to open another one. Let's
// do exactly that now. For this one we publish the transaction so we
// can mine it later.
fundingShim2, chanPoint2, _ := deriveFundingShim(
fundingShim2, chanPoint2, _ := deriveFundingShimOld(
net, t, carol, dave, chanSize, thawHeight, true,
)
@ -748,7 +748,8 @@ func testChannelFundingPersistence(net *lntest.NetworkHarness, t *harnessTest) {
// deriveFundingShim creates a channel funding shim by deriving the necessary
// keys on both sides.
func deriveFundingShim(net *lntest.NetworkHarness, t *harnessTest,
// TODO(yy): remove.
func deriveFundingShimOld(net *lntest.NetworkHarness, t *harnessTest,
carol, dave *lntest.HarnessNode, chanSize btcutil.Amount,
thawHeight uint32, publish bool) (*lnrpc.FundingShim,
*lnrpc.ChannelPoint, *chainhash.Hash) {

View File

@ -261,7 +261,7 @@ func createThreeHopNetwork(t *harnessTest, net *lntest.NetworkHarness,
_, minerHeight, err := net.Miner.Client.GetBestBlock()
require.NoError(t.t, err)
thawHeight = uint32(minerHeight + 144)
aliceFundingShim, _, _ = deriveFundingShim(
aliceFundingShim, _, _ = deriveFundingShimOld(
net, t, alice, bob, chanAmt, thawHeight, true,
)
}
@ -338,7 +338,7 @@ func createThreeHopNetwork(t *harnessTest, net *lntest.NetworkHarness,
// open, our topology looks like: A -> B -> C.
var bobFundingShim *lnrpc.FundingShim
if c == lnrpc.CommitmentType_SCRIPT_ENFORCED_LEASE {
bobFundingShim, _, _ = deriveFundingShim(
bobFundingShim, _, _ = deriveFundingShimOld(
net, t, bob, carol, chanAmt, thawHeight, true,
)
}