This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Eve received messages from Carol. | |
| 2022-12-06 01:09:31.414 [DBG] PEER: Peer([carol]): Received ChannelAnnouncement(chain_hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206, short_chan_id=[SID: carol=>Bob]) from [carol]@127.0.0.1:55297 | |
| 2022-12-06 01:09:31.449 [DBG] PEER: Peer([carol]): Received ChannelUpdate(chain_hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206, short_chan_id=[SID: carol=>Bob], mflags=00000001, cflags=00000000, update_time=2022-12-06 01:09:22 +0800 CST) from [carol]@127.0.0.1:55297 | |
| 2022-12-06 01:09:31.543 [DBG] DISC: Processing ChannelAnnouncement: peer=[carol]@127.0.0.1:55297, short_chan_id=[SID: carol=>Bob] | |
| 2022-12-06 01:09:31.767 [DBG] PEER: Peer([carol]): Received ChannelUpdate(chain_hash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206, short_chan_id=[SID: carol=>Bob], mflags=00000001, cflags=00000001, update_time=2022-12-06 01:09:21 +0800 CST) from [carol]@127.0.0.1:55297 | |
| // Eve tries to add the edge info heard from Carol. | |
| 2022- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "sort" | |
| "strings" | |
| "time" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "sync" | |
| "sync/atomic" | |
| "testing" | |
| ) | |
| func BenchmarkReadMutexMap(b *testing.B) { | |
| // Create a map with a mutex. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func BenchmarkBoolAmoticWrite(b *testing.B) { | |
| type foo struct { | |
| x atomic.Bool | |
| } | |
| f := &foo{} | |
| b.RunParallel(func(pb *testing.PB) { | |
| for pb.Next() { | |
| f.x.Store(true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func TestBatchUpdate(t *testing.T) { | |
| t.Parallel() | |
| fullDB, err := MakeTestDB(t, OptionStoreFinalHtlcResolutions(true)) | |
| require.NoError(t, err, "unable to make test database") | |
| cdb := fullDB.ChannelStateDB() | |
| chanID := lnwire.ShortChannelID{ | |
| BlockHeight: 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/htlcswitch/switch.go b/htlcswitch/switch.go | |
| index 720625f2c..60a150e5d 100644 | |
| --- a/htlcswitch/switch.go | |
| +++ b/htlcswitch/switch.go | |
| @@ -280,6 +280,8 @@ type Switch struct { | |
| // this channel. | |
| linkIndex map[lnwire.ChannelID]ChannelLink | |
| + attemptResultReqChan chan *attemptResultReq | |
| + |
OlderNewer