]> git.bitcoin.ninja Git - rust-lightning/commit
Don't consume readers with FixedLengthReader
authorWilmer Paulino <wilmer@wilmerpaulino.com>
Thu, 7 Mar 2024 22:37:58 +0000 (14:37 -0800)
committerWilmer Paulino <wilmer@wilmerpaulino.com>
Wed, 27 Mar 2024 21:27:55 +0000 (14:27 -0700)
commit3c24a137b1088ca75d549b4355dc18980fad1a44
tree2757d44dc92af2bc7919f0e075e6c1fe08b2df31
parent6d1111111ccafedec6b2050e76ce91eb59c993b4
Don't consume readers with FixedLengthReader

We can't always assume that we're done reading after using a
FixedLengthReader. In some cases, we may need to read a set of
length-prefixed objects one at a time, and we'd like to do so without
incurring an additional allocation by reading a number of bytes first to
then deserialize them.
lightning/src/crypto/streams.rs
lightning/src/events/mod.rs
lightning/src/util/ser.rs
lightning/src/util/ser_macros.rs