channeldb/channel: remove unused FullSync method

The exported FullSync method is only used by test code, so we remove it
and instead use SyncPending.
This commit is contained in:
Johan T. Halseth
2019-09-06 13:14:38 +02:00
parent b7e1bb0bf0
commit 0122dda88a
4 changed files with 33 additions and 18 deletions

View File

@ -7,6 +7,7 @@ import (
"encoding/hex"
"io"
"io/ioutil"
"net"
"os"
"github.com/btcsuite/btcd/btcec"
@ -334,10 +335,20 @@ func CreateTestChannels() (*LightningChannel, *LightningChannel, func(), error)
return nil, nil, nil, err
}
if err := channelAlice.channelState.FullSync(); err != nil {
addr := &net.TCPAddr{
IP: net.ParseIP("127.0.0.1"),
Port: 18556,
}
if err := channelAlice.channelState.SyncPending(addr, 101); err != nil {
return nil, nil, nil, err
}
if err := channelBob.channelState.FullSync(); err != nil {
addr = &net.TCPAddr{
IP: net.ParseIP("127.0.0.1"),
Port: 18555,
}
if err := channelBob.channelState.SyncPending(addr, 101); err != nil {
return nil, nil, nil, err
}