mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
lnwire: refactor Encode to use specific writers - III
This commit refactors the remaining usage of WriteElements. By replacing the interface types with concrete types for the params used in the methods, most of the encoding of the messages now takes zero heap allocations.
This commit is contained in:
@@ -232,7 +232,7 @@ func TestMaxOutPointIndex(t *testing.T) {
|
||||
}
|
||||
|
||||
var b bytes.Buffer
|
||||
if err := WriteElement(&b, op); err == nil {
|
||||
if err := WriteOutPoint(&b, op); err == nil {
|
||||
t.Fatalf("write of outPoint should fail, index exceeds 16-bits")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user