Skip to content

Commit d76cbde

Browse files
committed
f - s/bytes/invreq_bytes
1 parent 397244d commit d76cbde

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lightning/src/offers/invoice.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const SIGNATURE_TAG: &'static str = concat!("lightning", "invoice", "signature")
5151
/// [`Refund`]: crate::offers::refund::Refund
5252
/// [module-level documentation]: self
5353
pub struct InvoiceBuilder<'a> {
54-
bytes: &'a Vec<u8>,
54+
invreq_bytes: &'a Vec<u8>,
5555
invoice: InvoiceContents,
5656
}
5757

@@ -76,7 +76,7 @@ impl<'a> InvoiceBuilder<'a> {
7676
};
7777

7878
Ok(Self {
79-
bytes: &invoice_request.bytes,
79+
invreq_bytes: &invoice_request.bytes,
8080
invoice: InvoiceContents::ForOffer {
8181
invoice_request: invoice_request.contents.clone(),
8282
fields: InvoiceFields {
@@ -152,14 +152,14 @@ impl<'a> InvoiceBuilder<'a> {
152152
}
153153
}
154154

155-
let InvoiceBuilder { bytes, invoice } = self;
156-
Ok(UnsignedInvoice { bytes, invoice })
155+
let InvoiceBuilder { invreq_bytes, invoice } = self;
156+
Ok(UnsignedInvoice { invreq_bytes, invoice })
157157
}
158158
}
159159

160160
/// A semantically valid [`Invoice`] that hasn't been signed.
161161
pub struct UnsignedInvoice<'a> {
162-
bytes: &'a Vec<u8>,
162+
invreq_bytes: &'a Vec<u8>,
163163
invoice: InvoiceContents,
164164
}
165165

@@ -173,7 +173,7 @@ impl<'a> UnsignedInvoice<'a> {
173173
// may have contained unknown TLV records, which are not stored in `InvoiceRequestContents`
174174
// or `RefundContents`.
175175
let (_, _, _, invoice_tlv_stream) = self.invoice.as_tlv_stream();
176-
let invoice_request_bytes = WithoutSignatures(self.bytes);
176+
let invoice_request_bytes = WithoutSignatures(self.invreq_bytes);
177177
let unsigned_tlv_stream = (invoice_request_bytes, invoice_tlv_stream);
178178

179179
let mut bytes = Vec::new();

0 commit comments

Comments
 (0)