channeldb: fix data race in TestSerializeHTLCEntries

This commit is contained in:
yyforyongyu committed 2022-06-28 21:28:04 +08:00
1 parent 0df880139f
commit 0e12a91715
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{})