Skip to content

Commit fd5bbd6

Browse files
committed
Derive Hash for OfferId
Allow offer metadata maps to key entries directly by offer id without wrapping the identifier. Co-Authored-By: HAL 9000
1 parent 92c14f4 commit fd5bbd6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lightning/src/offers/offer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub(super) const IV_BYTES_WITH_METADATA: &[u8; IV_LEN] = b"LDK Offer ~~~~~~";
118118
pub(super) const IV_BYTES_WITHOUT_METADATA: &[u8; IV_LEN] = b"LDK Offer v2~~~~";
119119

120120
/// An identifier for an [`Offer`] built using [`DerivedMetadata`].
121-
#[derive(Clone, Copy, Eq, PartialEq)]
121+
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
122122
pub struct OfferId(pub [u8; 32]);
123123

124124
impl OfferId {

0 commit comments

Comments
 (0)