discovery: adhere to proper channel chunk splitting for ReplyChannelRange
This commit is contained in:
7 files changed
+340
-145
No files matched your search
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/ticker"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// randPeer creates a random peer.
|
||||
@@ -537,10 +538,14 @@ func assertTransitionToChansSynced(t *testing.T, s *GossipSyncer, peer *mockPeer
|
||||
}
|
||||
assertMsgSent(t, peer, query)
|
||||
|
||||
s.ProcessQueryMsg(&lnwire.ReplyChannelRange{
|
||||
require.Eventually(t, func() bool {
|
||||
return s.syncState() == waitingQueryRangeReply
|
||||
}, time.Second, 500*time.Millisecond)
|
||||
|
||||
require.NoError(t, s.ProcessQueryMsg(&lnwire.ReplyChannelRange{
|
||||
QueryChannelRange: *query,
|
||||
Complete: 1,
|
||||
}, nil)
|
||||
}, nil))
|
||||
|
||||
chanSeries := s.cfg.channelSeries.(*mockChannelGraphTimeSeries)
|
||||
|
||||
|
||||
Reference in new issue
Block a user