mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-23 17:59:41 +02:00
multi: use mutex-guarded ShortChanID() on OpenChannel
This commit is contained in:
@@ -364,7 +364,7 @@ func (cm *circuitMap) trimAllOpenCircuits() error {
|
||||
// First, skip any channels that have not been assigned their
|
||||
// final channel identifier, otherwise we would try to trim
|
||||
// htlcs belonging to the all-zero, sourceHop ID.
|
||||
chanID := activeChannel.ShortChanID
|
||||
chanID := activeChannel.ShortChanID()
|
||||
if chanID == sourceHop {
|
||||
continue
|
||||
}
|
||||
|
@@ -1560,7 +1560,7 @@ func (s *Switch) reforwardResponses() error {
|
||||
}
|
||||
|
||||
for _, activeChannel := range activeChannels {
|
||||
shortChanID := activeChannel.ShortChanID
|
||||
shortChanID := activeChannel.ShortChanID()
|
||||
fwdPkgs, err := s.loadChannelFwdPkgs(shortChanID)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@@ -324,7 +324,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
|
||||
RevocationStore: shachain.NewRevocationStore(),
|
||||
LocalCommitment: aliceCommit,
|
||||
RemoteCommitment: aliceCommit,
|
||||
ShortChanID: chanID,
|
||||
ShortChannelID: chanID,
|
||||
Db: dbAlice,
|
||||
Packager: channeldb.NewChannelPackager(chanID),
|
||||
FundingTxn: testTx,
|
||||
@@ -343,7 +343,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
|
||||
RevocationStore: shachain.NewRevocationStore(),
|
||||
LocalCommitment: bobCommit,
|
||||
RemoteCommitment: bobCommit,
|
||||
ShortChanID: chanID,
|
||||
ShortChannelID: chanID,
|
||||
Db: dbBob,
|
||||
Packager: channeldb.NewChannelPackager(chanID),
|
||||
}
|
||||
|
Reference in New Issue
Block a user