Merge pull request #6673 from yyforyongyu/6661-data-race

channeldb: fix data race in TestSerializeHTLCEntries
This commit is contained in:
Oliver Gugger authored and GitHub committed 2022-06-28 16:01:20 +02:00
commit 778c7287b0
2 files changed
+9 -2

No files matched your search

+3 -2
View File
@@ -211,9 +211,10 @@ func TestSerializeHTLCEntries(t *testing.T) {
func TestSerializeRevocationLog(t *testing.T) {
t.Parallel()
// Copy the testRevocationLog.
// Copy the testRevocationLog and testHTLCEntry.
rl := testRevocationLog
rl.HTLCEntries = []*HTLCEntry{&testHTLCEntry}
htlc := testHTLCEntry
rl.HTLCEntries = []*HTLCEntry{&htlc}
// Write the tlv stream.
buf := bytes.NewBuffer([]byte{})
@@ -15,8 +15,14 @@
* [Add previous_outpoints to listchaintxns](https://github.com/lightningnetwork/lnd/pull/6321)
## Bug Fixes
* Fixed data race found in
[`TestSerializeHTLCEntries`](https://github.com/lightningnetwork/lnd/pull/6673).
# Contributors (Alphabetical Order)
* Elle Mouton
* ErikEk
* Priyansh Rastogi
* Yong Yu