projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update ChannelConfig serialization to be TLV-based
[rust-lightning]
/
lightning
/
src
/
util
/
ser_macros.rs
diff --git
a/lightning/src/util/ser_macros.rs
b/lightning/src/util/ser_macros.rs
index b93115dcc95933bbc5a617bbf1dc5083f25cdd10..86149d22f9ebf4b679909527bfb3d950adb2fe1d 100644
(file)
--- a/
lightning/src/util/ser_macros.rs
+++ b/
lightning/src/util/ser_macros.rs
@@
-173,7
+173,7
@@
macro_rules! decode_tlv_stream {
last_seen_type = Some(typ.0);
// Finally, read the length and value itself:
last_seen_type = Some(typ.0);
// Finally, read the length and value itself:
- let length: ser::BigSize = Readable::read($stream)?;
+ let length: ser::BigSize =
ser::
Readable::read($stream)?;
let mut s = ser::FixedLengthReader::new($stream, length.0);
match typ.0 {
$($type => {
let mut s = ser::FixedLengthReader::new($stream, length.0);
match typ.0 {
$($type => {
@@
-503,7
+503,7
@@
mod tests {
use prelude::*;
use std::io::Cursor;
use ln::msgs::DecodeError;
use prelude::*;
use std::io::Cursor;
use ln::msgs::DecodeError;
- use util::ser::{
Readable,
Writeable, HighZeroBytesDroppedVarInt, VecWriter};
+ use util::ser::{Writeable, HighZeroBytesDroppedVarInt, VecWriter};
use bitcoin::secp256k1::PublicKey;
// The BOLT TLV test cases don't include any tests which use our "required-value" logic since
use bitcoin::secp256k1::PublicKey;
// The BOLT TLV test cases don't include any tests which use our "required-value" logic since