mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-28 20:32:36 +02:00
channeldb: prepare RevocationLog for optional fields
This commit is a pure refactor. It restructures the RevocationLog serialize and deserialize methods so that optional TLV fields can be easily added.
This commit is contained in:
@@ -127,7 +127,7 @@ func TestReadTLVStream(t *testing.T) {
|
||||
|
||||
// Read the tlv stream.
|
||||
buf := bytes.NewBuffer(testValueBytes)
|
||||
err = readTlvStream(buf, ts)
|
||||
_, err = readTlvStream(buf, ts)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Check the bytes are read as expected.
|
||||
@@ -150,7 +150,7 @@ func TestReadTLVStreamErr(t *testing.T) {
|
||||
|
||||
// Read the tlv stream.
|
||||
buf := bytes.NewBuffer(b)
|
||||
err = readTlvStream(buf, ts)
|
||||
_, err = readTlvStream(buf, ts)
|
||||
require.ErrorIs(t, err, io.ErrUnexpectedEOF)
|
||||
|
||||
// Check the bytes are not read.
|
||||
|
Reference in New Issue
Block a user