(2, payment_failed_permanently, required),
(3, false, required), // all_paths_failed in LDK versions prior to 0.0.114
(4, path.blinded_tail, option),
- (5, path.hops, vec_type),
+ (5, path.hops, required_vec),
(7, short_channel_id, option),
(9, None::<RouteParameters>, option), // retry in LDK versions prior to 0.0.115
(11, payment_id, option),
write_tlv_fields!(writer, {
(0, payment_id, required),
(2, payment_hash, option),
- (4, path.hops, vec_type),
+ (4, path.hops, required_vec),
(6, path.blinded_tail, option),
})
},
write_tlv_fields!(writer, {
(0, payment_id, required),
(2, payment_hash, required),
- (4, path.hops, vec_type),
+ (4, path.hops, required_vec),
(6, path.blinded_tail, option),
})
},
write_tlv_fields!(writer, {
(0, payment_id, required),
(2, payment_hash, required),
- (4, path.hops, vec_type),
+ (4, path.hops, required_vec),
(6, short_channel_id, option),
(8, path.blinded_tail, option),
})
(1, network_update, upgradable_option),
(2, payment_failed_permanently, required),
(4, blinded_tail, option),
- (5, path, vec_type),
+ // Added as a part of LDK 0.0.101 and always filled in since.
+ // Defaults to an empty Vec, though likely should have been `Option`al.
+ (5, path, optional_vec),
(7, short_channel_id, option),
(11, payment_id, option),
(13, failure_opt, upgradable_option),
_init_and_read_tlv_fields!(reader, {
(0, payment_id, required),
(2, payment_hash, option),
- (4, path, vec_type),
+ (4, path, required_vec),
(6, blinded_tail, option),
});
Ok(Some(Event::PaymentPathSuccessful {
payment_id: payment_id.0.unwrap(),
payment_hash,
- path: Path { hops: path.unwrap(), blinded_tail },
+ path: Path { hops: path, blinded_tail },
}))
};
f()
_init_and_read_tlv_fields!(reader, {
(0, payment_id, required),
(2, payment_hash, required),
- (4, path, vec_type),
+ (4, path, required_vec),
(6, blinded_tail, option),
});
Ok(Some(Event::ProbeSuccessful {
payment_id: payment_id.0.unwrap(),
payment_hash: payment_hash.0.unwrap(),
- path: Path { hops: path.unwrap(), blinded_tail },
+ path: Path { hops: path, blinded_tail },
}))
};
f()
_init_and_read_tlv_fields!(reader, {
(0, payment_id, required),
(2, payment_hash, required),
- (4, path, vec_type),
+ (4, path, required_vec),
(6, short_channel_id, option),
(8, blinded_tail, option),
});
Ok(Some(Event::ProbeFailed {
payment_id: payment_id.0.unwrap(),
payment_hash: payment_hash.0.unwrap(),
- path: Path { hops: path.unwrap(), blinded_tail },
+ path: Path { hops: path, blinded_tail },
short_channel_id,
}))
};