Skip to content

Commit 580e549

Browse files
chore: remove dead code
1 parent 334a7d1 commit 580e549

23 files changed

+0
-335
lines changed

channeldb/channel_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/btcsuite/btcd/wire"
1818
_ "github.com/btcsuite/btcwallet/walletdb/bdb"
1919
"github.com/davecgh/go-spew/spew"
20-
"github.com/lightningnetwork/lnd/clock"
2120
"github.com/lightningnetwork/lnd/fn/v2"
2221
"github.com/lightningnetwork/lnd/graph/db/models"
2322
"github.com/lightningnetwork/lnd/keychain"
@@ -60,8 +59,6 @@ var (
6059

6160
testPub = route.Vertex{2, 202, 4}
6261

63-
testClock = clock.NewTestClock(testNow)
64-
6562
// defaultPendingHeight is the default height at which we set
6663
// channels to pending.
6764
defaultPendingHeight = 100

channeldb/payments_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,6 @@ var (
4646
LegacyPayload: true,
4747
}
4848

49-
testHop3 = &route.Hop{
50-
PubKeyBytes: route.NewVertex(pub),
51-
ChannelID: 12345,
52-
OutgoingTimeLock: 111,
53-
AmtToForward: 555,
54-
CustomRecords: record.CustomSet{
55-
65536: []byte{},
56-
80001: []byte{},
57-
},
58-
AMP: record.NewAMP([32]byte{0x69}, [32]byte{0x42}, 1),
59-
Metadata: []byte{1, 2, 3},
60-
}
61-
6249
testRoute = route.Route{
6350
TotalTimeLock: 123,
6451
TotalAmount: 1234567,

contractcourt/channel_arbitrator.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ var (
3838
)
3939

4040
const (
41-
// arbitratorBlockBufferSize is the size of the buffer we give to each
42-
// channel arbitrator.
43-
arbitratorBlockBufferSize = 20
44-
4541
// AnchorOutputValue is the output value for the anchor output of an
4642
// anchor channel.
4743
// See BOLT 03 for more details:

contractcourt/contract_resolver.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ var (
1818
endian = binary.BigEndian
1919
)
2020

21-
const (
22-
// sweepConfTarget is the default number of blocks that we'll use as a
23-
// confirmation target when sweeping.
24-
sweepConfTarget = 6
25-
)
26-
2721
// ContractResolver is an interface which packages a state machine which is
2822
// able to carry out the necessary steps required to fully resolve a Bitcoin
2923
// contract on-chain. Resolvers are fully encodable to ensure callers are able

contractcourt/utxonursery.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@ import (
160160

161161
var byteOrder = binary.BigEndian
162162

163-
const (
164-
// kgtnOutputConfTarget is the default confirmation target we'll use for
165-
// sweeps of CSV delayed outputs.
166-
kgtnOutputConfTarget = 6
167-
)
168-
169163
var (
170164
// ErrContractNotFound is returned when the nursery is unable to
171165
// retrieve information about a queried contract.

discovery/gossiper_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -447,18 +447,6 @@ func (m *mockNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint, _ []byte,
447447
return nil, nil
448448
}
449449

450-
func (m *mockNotifier) notifyBlock(hash chainhash.Hash, height uint32) {
451-
m.RLock()
452-
defer m.RUnlock()
453-
454-
for _, client := range m.epochClients {
455-
client <- &chainntnfs.BlockEpoch{
456-
Height: int32(height),
457-
Hash: &hash,
458-
}
459-
}
460-
}
461-
462450
func (m *mockNotifier) RegisterBlockEpochNtfn(
463451
bestBlock *chainntnfs.BlockEpoch) (*chainntnfs.BlockEpochEvent, error) {
464452
m.RLock()

graph/notifications_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ var (
3838

3939
testFeatures = lnwire.NewFeatureVector(nil, lnwire.Features)
4040

41-
testHash = [32]byte{
42-
0xb7, 0x94, 0x38, 0x5f, 0x2d, 0x1e, 0xf7, 0xab,
43-
0x4d, 0x92, 0x73, 0xd1, 0x90, 0x63, 0x81, 0xb4,
44-
0x4f, 0x2f, 0x6f, 0x25, 0x88, 0xa3, 0xef, 0xb9,
45-
0x6a, 0x49, 0x18, 0x83, 0x31, 0x98, 0x47, 0x53,
46-
}
47-
4841
testTime = time.Date(2018, time.January, 9, 14, 00, 00, 0, time.UTC)
4942

5043
priv1, _ = btcec.NewPrivateKey()

htlcswitch/mock.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,6 @@ func (f *mockChannelLink) ChannelPoint() wire.OutPoint {
925925
func (f *mockChannelLink) Stop() {}
926926
func (f *mockChannelLink) EligibleToForward() bool { return f.eligible }
927927
func (f *mockChannelLink) MayAddOutgoingHtlc(lnwire.MilliSatoshi) error { return nil }
928-
func (f *mockChannelLink) setLiveShortChanID(sid lnwire.ShortChannelID) { f.shortChanID = sid }
929928
func (f *mockChannelLink) IsUnadvertised() bool { return f.unadvertised }
930929
func (f *mockChannelLink) UpdateShortChanID() (lnwire.ShortChannelID, error) {
931930
f.eligible = true

internal/musig2v040/bench_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import (
1414
)
1515

1616
var (
17-
testPrivBytes = hexToModNScalar("9e0699c91ca1e3b7e3c9ba71eb71c89890872be97576010fe593fbf3fd57e66d")
18-
1917
testMsg = hexToBytes("c301ba9de5d6053caad9f5eb46523f007702add2c62fa39de03146a36b8026b7")
2018
)
2119

@@ -27,18 +25,6 @@ func hexToBytes(s string) []byte {
2725
return b
2826
}
2927

30-
func hexToModNScalar(s string) *btcec.ModNScalar {
31-
b, err := hex.DecodeString(s)
32-
if err != nil {
33-
panic("invalid hex in source file: " + s)
34-
}
35-
var scalar btcec.ModNScalar
36-
if overflow := scalar.SetByteSlice(b); overflow {
37-
panic("hex in source file overflows mod N scalar: " + s)
38-
}
39-
return &scalar
40-
}
41-
4228
func genSigner(t *testing.B) signer {
4329
privKey, err := btcec.NewPrivateKey()
4430
if err != nil {

internal/musig2v040/musig2_test.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -274,22 +274,6 @@ func mustParseHex(str string) []byte {
274274
return b
275275
}
276276

277-
func parseKey(xHex string) *btcec.PublicKey {
278-
xB, err := hex.DecodeString(xHex)
279-
if err != nil {
280-
panic(err)
281-
}
282-
283-
var x, y btcec.FieldVal
284-
x.SetByteSlice(xB)
285-
if !btcec.DecompressY(&x, false, &y) {
286-
panic("x not on curve")
287-
}
288-
y.Normalize()
289-
290-
return btcec.NewPublicKey(&x, &y)
291-
}
292-
293277
var (
294278
signSetPrivKey, _ = btcec.PrivKeyFromBytes(
295279
mustParseHex("7FB9E0E687ADA1EEBF7ECFE2F21E73EBDB51A7D450948DF" +
@@ -306,9 +290,6 @@ var (
306290
signSetKey3 = mustParseHex("DFF1D77F2A671C5F36183726DB2341BE58FEAE1DA" +
307291
"2DECED843240F7B502BA659")
308292

309-
invalidSetKey1 = mustParseHex("00000000000000000000000000000000" +
310-
"00000000000000000000000000000007")
311-
312293
signExpected1 = mustParseHex("68537CC5234E505BD14061F8DA9E90C220A1818" +
313294
"55FD8BDB7F127BB12403B4D3B")
314295
signExpected2 = mustParseHex("2DF67BFFF18E3DE797E13C6475C963048138DAE" +
@@ -970,14 +951,6 @@ func (s signerSet) pubNonces() [][PubNonceSize]byte {
970951
return nonces
971952
}
972953

973-
func (s signerSet) combinedKey() *btcec.PublicKey {
974-
uniqueKeyIndex := secondUniqueKeyIndex(s.keys(), false)
975-
key, _, _, _ := AggregateKeys(
976-
s.keys(), false, WithUniqueKeyIndex(uniqueKeyIndex),
977-
)
978-
return key.FinalKey
979-
}
980-
981954
// testMultiPartySign executes a multi-party signing context w/ 100 signers.
982955
func testMultiPartySign(t *testing.T, taprootTweak []byte,
983956
tweaks ...KeyTweakDesc) {

0 commit comments

Comments
 (0)