Merge pull request #1862 from Roasbeef/chan-series-test-fixes
multi: fix panic bug in chan series, itest test flake, update neutrino to latest version
This commit is contained in:
5 files changed
+51
-5
No files matched your search
Generated
+2
-2
@@ -265,7 +265,7 @@
|
|||||||
revision = "462a8a75388506b68f76661af8d649f0b88e5301"
|
revision = "462a8a75388506b68f76661af8d649f0b88e5301"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:b87ab48ac3bdfcf8d90c51f9c1a4061660dcb2e1c3c12822ccfc131f5a898578"
|
digest = "1:dba95a15051bdc8ff8373f9c76cf2b63945b896e4302b77e869ea9b9d0dfbee2"
|
||||||
name = "github.com/lightninglabs/neutrino"
|
name = "github.com/lightninglabs/neutrino"
|
||||||
packages = [
|
packages = [
|
||||||
".",
|
".",
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
"headerlist",
|
"headerlist",
|
||||||
]
|
]
|
||||||
pruneopts = "UT"
|
pruneopts = "UT"
|
||||||
revision = "cccdda0fbb69281c17de496da88e956c300511e2"
|
revision = "07e32eee63e2a6f16acbc8df85c6530972015a44"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:58ab6d6525898cbeb86dc29a68f8e9bfe95254b9032134eb9458779574872260"
|
digest = "1:58ab6d6525898cbeb86dc29a68f8e9bfe95254b9032134eb9458779574872260"
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "github.com/lightninglabs/neutrino"
|
name = "github.com/lightninglabs/neutrino"
|
||||||
revision = "cccdda0fbb69281c17de496da88e956c300511e2"
|
revision = "07e32eee63e2a6f16acbc8df85c6530972015a44"
|
||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "github.com/lightningnetwork/lightning-onion"
|
name = "github.com/lightningnetwork/lightning-onion"
|
||||||
|
|||||||
+1
-1
@@ -297,7 +297,7 @@ func (c *chanSeries) FetchChanUpdates(chain chainhash.Hash,
|
|||||||
HtlcMinimumMsat: e2.MinHTLC,
|
HtlcMinimumMsat: e2.MinHTLC,
|
||||||
BaseFee: uint32(e2.FeeBaseMSat),
|
BaseFee: uint32(e2.FeeBaseMSat),
|
||||||
FeeRate: uint32(e2.FeeProportionalMillionths),
|
FeeRate: uint32(e2.FeeProportionalMillionths),
|
||||||
ExtraOpaqueData: e1.ExtraOpaqueData,
|
ExtraOpaqueData: e2.ExtraOpaqueData,
|
||||||
}
|
}
|
||||||
chanUpdate.Signature, err = lnwire.NewSigFromRawSignature(e2.SigBytes)
|
chanUpdate.Signature, err = lnwire.NewSigFromRawSignature(e2.SigBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+41
@@ -5715,6 +5715,47 @@ func testGarbageCollectLinkNodes(net *lntest.NetworkHarness, t *harnessTest) {
|
|||||||
t.Fatalf("unable to generate blocks: %v", err)
|
t.Fatalf("unable to generate blocks: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Before we test reconnection, we'll ensure that the channel has been
|
||||||
|
// fully cleaned up for both Carol and Alice.
|
||||||
|
var predErr error
|
||||||
|
pendingChansRequest := &lnrpc.PendingChannelsRequest{}
|
||||||
|
err = lntest.WaitPredicate(func() bool {
|
||||||
|
ctxt, _ = context.WithTimeout(ctxb, timeout)
|
||||||
|
pendingChanResp, err := net.Alice.PendingChannels(
|
||||||
|
ctxt, pendingChansRequest,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
predErr = fmt.Errorf("unable to query for pending "+
|
||||||
|
"channels: %v", err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
predErr = checkNumForceClosedChannels(pendingChanResp, 0)
|
||||||
|
if predErr != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
ctxt, _ = context.WithTimeout(ctxb, timeout)
|
||||||
|
pendingChanResp, err = carol.PendingChannels(
|
||||||
|
ctxt, pendingChansRequest,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
predErr = fmt.Errorf("unable to query for pending "+
|
||||||
|
"channels: %v", err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
predErr = checkNumForceClosedChannels(pendingChanResp, 0)
|
||||||
|
if predErr != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}, time.Second*15)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("channels not marked as fully resolved: %v", predErr)
|
||||||
|
}
|
||||||
|
|
||||||
testReconnection(carol)
|
testReconnection(carol)
|
||||||
|
|
||||||
// Finally, we'll ensure that Bob and Carol no longer show in Alice's
|
// Finally, we'll ensure that Bob and Carol no longer show in Alice's
|
||||||
|
|||||||
+6
-1
@@ -24,6 +24,7 @@ import (
|
|||||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||||
"github.com/btcsuite/btcd/rpcclient"
|
"github.com/btcsuite/btcd/rpcclient"
|
||||||
"github.com/btcsuite/btcd/wire"
|
"github.com/btcsuite/btcd/wire"
|
||||||
|
"github.com/btcsuite/btcutil"
|
||||||
"github.com/go-errors/errors"
|
"github.com/go-errors/errors"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc"
|
"github.com/lightningnetwork/lnd/lnrpc"
|
||||||
"github.com/lightningnetwork/lnd/macaroons"
|
"github.com/lightningnetwork/lnd/macaroons"
|
||||||
@@ -901,6 +902,7 @@ func (hn *HarnessNode) WaitForBalance(expectedBalance int64, confirmed bool) err
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
req := &lnrpc.WalletBalanceRequest{}
|
req := &lnrpc.WalletBalanceRequest{}
|
||||||
|
|
||||||
|
var lastBalance btcutil.Amount
|
||||||
doesBalanceMatch := func() bool {
|
doesBalanceMatch := func() bool {
|
||||||
balance, err := hn.WalletBalance(ctx, req)
|
balance, err := hn.WalletBalance(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -908,15 +910,18 @@ func (hn *HarnessNode) WaitForBalance(expectedBalance int64, confirmed bool) err
|
|||||||
}
|
}
|
||||||
|
|
||||||
if confirmed {
|
if confirmed {
|
||||||
|
lastBalance = btcutil.Amount(balance.ConfirmedBalance)
|
||||||
return balance.ConfirmedBalance == expectedBalance
|
return balance.ConfirmedBalance == expectedBalance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastBalance = btcutil.Amount(balance.UnconfirmedBalance)
|
||||||
return balance.UnconfirmedBalance == expectedBalance
|
return balance.UnconfirmedBalance == expectedBalance
|
||||||
}
|
}
|
||||||
|
|
||||||
err := WaitPredicate(doesBalanceMatch, 30*time.Second)
|
err := WaitPredicate(doesBalanceMatch, 30*time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.New("balances not synced after deadline")
|
return fmt.Errorf("balances not synced after deadline: "+
|
||||||
|
"expected %v, only have %v", expectedBalance, lastBalance)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in new issue
Block a user