mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 20:15:18 +02:00
channeldb: fix data race in TestSerializeRevocationLog
When testing serializing revocation log, we need to also copy its `HTLCEntries` as the serialization of the HTLC involves a writing to the `htlc.amtTlv` field.
This commit is contained in:
@@ -213,6 +213,7 @@ func TestSerializeRevocationLog(t *testing.T) {
|
||||
|
||||
// Copy the testRevocationLog.
|
||||
rl := testRevocationLog
|
||||
rl.HTLCEntries = []*HTLCEntry{&testHTLCEntry}
|
||||
|
||||
// Write the tlv stream.
|
||||
buf := bytes.NewBuffer([]byte{})
|
||||
|
Reference in New Issue
Block a user