multi: update to go 1.11 gofmt
This commit is contained in:
parent
233246714d
commit
d8e6085c17
@ -229,7 +229,7 @@ func (d *databaseChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey,
|
|||||||
MinHTLC: 1,
|
MinHTLC: 1,
|
||||||
FeeBaseMSat: 10,
|
FeeBaseMSat: 10,
|
||||||
FeeProportionalMillionths: 10000,
|
FeeProportionalMillionths: 10000,
|
||||||
Flags: 0,
|
Flags: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := d.db.UpdateEdgePolicy(edgePolicy); err != nil {
|
if err := d.db.UpdateEdgePolicy(edgePolicy); err != nil {
|
||||||
@ -243,7 +243,7 @@ func (d *databaseChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey,
|
|||||||
MinHTLC: 1,
|
MinHTLC: 1,
|
||||||
FeeBaseMSat: 10,
|
FeeBaseMSat: 10,
|
||||||
FeeProportionalMillionths: 10000,
|
FeeProportionalMillionths: 10000,
|
||||||
Flags: 1,
|
Flags: 1,
|
||||||
}
|
}
|
||||||
if err := d.db.UpdateEdgePolicy(edgePolicy); err != nil {
|
if err := d.db.UpdateEdgePolicy(edgePolicy); err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
@ -704,9 +704,9 @@ func TestEdgeInfoUpdates(t *testing.T) {
|
|||||||
MinHTLC: 2342135,
|
MinHTLC: 2342135,
|
||||||
FeeBaseMSat: 4352345,
|
FeeBaseMSat: 4352345,
|
||||||
FeeProportionalMillionths: 3452352,
|
FeeProportionalMillionths: 3452352,
|
||||||
Node: secondNode,
|
Node: secondNode,
|
||||||
ExtraOpaqueData: []byte("new unknown feature2"),
|
ExtraOpaqueData: []byte("new unknown feature2"),
|
||||||
db: db,
|
db: db,
|
||||||
}
|
}
|
||||||
edge2 := &ChannelEdgePolicy{
|
edge2 := &ChannelEdgePolicy{
|
||||||
SigBytes: testSig.Serialize(),
|
SigBytes: testSig.Serialize(),
|
||||||
@ -717,9 +717,9 @@ func TestEdgeInfoUpdates(t *testing.T) {
|
|||||||
MinHTLC: 2342135,
|
MinHTLC: 2342135,
|
||||||
FeeBaseMSat: 4352345,
|
FeeBaseMSat: 4352345,
|
||||||
FeeProportionalMillionths: 90392423,
|
FeeProportionalMillionths: 90392423,
|
||||||
Node: firstNode,
|
Node: firstNode,
|
||||||
ExtraOpaqueData: []byte("new unknown feature1"),
|
ExtraOpaqueData: []byte("new unknown feature1"),
|
||||||
db: db,
|
db: db,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next, insert both nodes into the database, they should both be
|
// Next, insert both nodes into the database, they should both be
|
||||||
@ -796,7 +796,7 @@ func newEdgePolicy(chanID uint64, op wire.OutPoint, db *DB,
|
|||||||
MinHTLC: lnwire.MilliSatoshi(prand.Int63()),
|
MinHTLC: lnwire.MilliSatoshi(prand.Int63()),
|
||||||
FeeBaseMSat: lnwire.MilliSatoshi(prand.Int63()),
|
FeeBaseMSat: lnwire.MilliSatoshi(prand.Int63()),
|
||||||
FeeProportionalMillionths: lnwire.MilliSatoshi(prand.Int63()),
|
FeeProportionalMillionths: lnwire.MilliSatoshi(prand.Int63()),
|
||||||
db: db,
|
db: db,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ func newCircuitMap(t *testing.T) (*htlcswitch.CircuitMapConfig,
|
|||||||
onionProcessor := newOnionProcessor(t)
|
onionProcessor := newOnionProcessor(t)
|
||||||
|
|
||||||
circuitMapCfg := &htlcswitch.CircuitMapConfig{
|
circuitMapCfg := &htlcswitch.CircuitMapConfig{
|
||||||
DB: makeCircuitDB(t, ""),
|
DB: makeCircuitDB(t, ""),
|
||||||
ExtractErrorEncrypter: onionProcessor.ExtractErrorEncrypter,
|
ExtractErrorEncrypter: onionProcessor.ExtractErrorEncrypter,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -660,7 +660,7 @@ func restartCircuitMap(t *testing.T, cfg *htlcswitch.CircuitMapConfig) (
|
|||||||
|
|
||||||
// Reinitialize circuit map with same db path.
|
// Reinitialize circuit map with same db path.
|
||||||
cfg2 := &htlcswitch.CircuitMapConfig{
|
cfg2 := &htlcswitch.CircuitMapConfig{
|
||||||
DB: makeCircuitDB(t, dbPath),
|
DB: makeCircuitDB(t, dbPath),
|
||||||
ExtractErrorEncrypter: cfg.ExtractErrorEncrypter,
|
ExtractErrorEncrypter: cfg.ExtractErrorEncrypter,
|
||||||
}
|
}
|
||||||
cm2, err := htlcswitch.NewCircuitMap(cfg2)
|
cm2, err := htlcswitch.NewCircuitMap(cfg2)
|
||||||
|
@ -282,7 +282,7 @@ type Switch struct {
|
|||||||
// New creates the new instance of htlc switch.
|
// New creates the new instance of htlc switch.
|
||||||
func New(cfg Config, currentHeight uint32) (*Switch, error) {
|
func New(cfg Config, currentHeight uint32) (*Switch, error) {
|
||||||
circuitMap, err := NewCircuitMap(&CircuitMapConfig{
|
circuitMap, err := NewCircuitMap(&CircuitMapConfig{
|
||||||
DB: cfg.DB,
|
DB: cfg.DB,
|
||||||
ExtractErrorEncrypter: cfg.ExtractErrorEncrypter,
|
ExtractErrorEncrypter: cfg.ExtractErrorEncrypter,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
2
lnd.go
2
lnd.go
@ -564,7 +564,7 @@ func genCertPair(certFile, keyFile string) error {
|
|||||||
|
|
||||||
KeyUsage: x509.KeyUsageKeyEncipherment |
|
KeyUsage: x509.KeyUsageKeyEncipherment |
|
||||||
x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
|
x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
|
||||||
IsCA: true, // so can sign self.
|
IsCA: true, // so can sign self.
|
||||||
BasicConstraintsValid: true,
|
BasicConstraintsValid: true,
|
||||||
|
|
||||||
DNSNames: dnsNames,
|
DNSNames: dnsNames,
|
||||||
|
@ -78,7 +78,7 @@ func randEdgePolicy(chanID *lnwire.ShortChannelID,
|
|||||||
MinHTLC: lnwire.MilliSatoshi(prand.Int31()),
|
MinHTLC: lnwire.MilliSatoshi(prand.Int31()),
|
||||||
FeeBaseMSat: lnwire.MilliSatoshi(prand.Int31()),
|
FeeBaseMSat: lnwire.MilliSatoshi(prand.Int31()),
|
||||||
FeeProportionalMillionths: lnwire.MilliSatoshi(prand.Int31()),
|
FeeProportionalMillionths: lnwire.MilliSatoshi(prand.Int31()),
|
||||||
Node: node,
|
Node: node,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -973,7 +973,7 @@ func TestNewRoute(t *testing.T) {
|
|||||||
|
|
||||||
return &ChannelHop{
|
return &ChannelHop{
|
||||||
ChannelEdgePolicy: &channeldb.ChannelEdgePolicy{
|
ChannelEdgePolicy: &channeldb.ChannelEdgePolicy{
|
||||||
Node: &channeldb.LightningNode{},
|
Node: &channeldb.LightningNode{},
|
||||||
FeeProportionalMillionths: feeRate,
|
FeeProportionalMillionths: feeRate,
|
||||||
FeeBaseMSat: baseFee,
|
FeeBaseMSat: baseFee,
|
||||||
TimeLockDelta: timeLockDelta,
|
TimeLockDelta: timeLockDelta,
|
||||||
|
Loading…
Reference in New Issue
Block a user