projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Parameterize InboundPayload reads with NodeSigner
[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 4f1fada952a49af110bd0abc67e38edb5b8ba293..247fdf60074dc4ff0bad148bef3c89ae374f26d6 100644
(file)
--- a/
lightning/src/util/ser_macros.rs
+++ b/
lightning/src/util/ser_macros.rs
@@
-791,6
+791,9
@@
macro_rules! _init_tlv_field_var {
/// Equivalent to running [`_init_tlv_field_var`] then [`read_tlv_fields`].
///
/// Equivalent to running [`_init_tlv_field_var`] then [`read_tlv_fields`].
///
+/// If any unused values are read, their type MUST be specified or else `rustc` will read them as an
+/// `i64`.
+///
/// This is exported for use by other exported macros, do not use directly.
#[doc(hidden)]
#[macro_export]
/// This is exported for use by other exported macros, do not use directly.
#[doc(hidden)]
#[macro_export]
@@
-807,6
+810,9
@@
macro_rules! _init_and_read_len_prefixed_tlv_fields {
}
/// Equivalent to running [`_init_tlv_field_var`] then [`decode_tlv_stream`].
}
/// Equivalent to running [`_init_tlv_field_var`] then [`decode_tlv_stream`].
+///
+/// If any unused values are read, their type MUST be specified or else `rustc` will read them as an
+/// `i64`.
macro_rules! _init_and_read_tlv_stream {
($reader: ident, {$(($type: expr, $field: ident, $fieldty: tt)),* $(,)*}) => {
$(
macro_rules! _init_and_read_tlv_stream {
($reader: ident, {$(($type: expr, $field: ident, $fieldty: tt)),* $(,)*}) => {
$(