@@ -264,7 +264,7 @@ impl FromStr for SignedRawInvoice {
264
264
hrp. as_bytes ( ) ,
265
265
& data[ ..data. len ( ) -104 ]
266
266
) ,
267
- signature : Signature :: from_base32 ( & data[ data. len ( ) -104 ..] ) ?,
267
+ signature : InvoiceSignature :: from_base32 ( & data[ data. len ( ) -104 ..] ) ?,
268
268
} )
269
269
}
270
270
}
@@ -338,17 +338,17 @@ impl FromBase32 for PositiveTimestamp {
338
338
}
339
339
}
340
340
341
- impl FromBase32 for Signature {
341
+ impl FromBase32 for InvoiceSignature {
342
342
type Err = ParseError ;
343
343
fn from_base32 ( signature : & [ u5 ] ) -> Result < Self , Self :: Err > {
344
344
if signature. len ( ) != 104 {
345
- return Err ( ParseError :: InvalidSliceLength ( "Signature ::from_base32()" . into ( ) ) ) ;
345
+ return Err ( ParseError :: InvalidSliceLength ( "InvoiceSignature ::from_base32()" . into ( ) ) ) ;
346
346
}
347
347
let recoverable_signature_bytes = Vec :: < u8 > :: from_base32 ( signature) ?;
348
348
let signature = & recoverable_signature_bytes[ 0 ..64 ] ;
349
349
let recovery_id = RecoveryId :: from_i32 ( recoverable_signature_bytes[ 64 ] as i32 ) ?;
350
350
351
- Ok ( Signature ( RecoverableSignature :: from_compact (
351
+ Ok ( InvoiceSignature ( RecoverableSignature :: from_compact (
352
352
signature,
353
353
recovery_id
354
354
) ?) )
@@ -999,7 +999,7 @@ mod test {
999
999
use lightning:: ln:: features:: InvoiceFeatures ;
1000
1000
use secp256k1:: recovery:: { RecoveryId , RecoverableSignature } ;
1001
1001
use TaggedField :: * ;
1002
- use { SiPrefix , SignedRawInvoice , Signature , RawInvoice , RawHrp , RawDataPart ,
1002
+ use { SiPrefix , SignedRawInvoice , InvoiceSignature , RawInvoice , RawHrp , RawDataPart ,
1003
1003
Currency , Sha256 , PositiveTimestamp } ;
1004
1004
1005
1005
// Feature bits 9, 15, and 99 are set.
@@ -1025,7 +1025,7 @@ mod test {
1025
1025
hash : [ 0xb1 , 0x96 , 0x46 , 0xc3 , 0xbc , 0x56 , 0x76 , 0x1d , 0x20 , 0x65 , 0x6e , 0x0e , 0x32 ,
1026
1026
0xec , 0xd2 , 0x69 , 0x27 , 0xb7 , 0x62 , 0x6e , 0x2a , 0x8b , 0xe6 , 0x97 , 0x71 , 0x9f ,
1027
1027
0xf8 , 0x7e , 0x44 , 0x54 , 0x55 , 0xb9 ] ,
1028
- signature : Signature ( RecoverableSignature :: from_compact (
1028
+ signature : InvoiceSignature ( RecoverableSignature :: from_compact (
1029
1029
& [ 0xd7 , 0x90 , 0x4c , 0xc4 , 0xb7 , 0x4a , 0x22 , 0x26 , 0x9c , 0x68 , 0xc1 , 0xdf , 0x68 ,
1030
1030
0xa9 , 0x6c , 0x21 , 0x4d , 0x65 , 0x1b , 0x93 , 0x76 , 0xe9 , 0xf1 , 0x64 , 0xd3 , 0x60 ,
1031
1031
0x4d , 0xa4 , 0xb7 , 0xde , 0xcc , 0xce , 0x0e , 0x82 , 0xaa , 0xab , 0x4c , 0x85 , 0xd3 ,
@@ -1045,7 +1045,7 @@ mod test {
1045
1045
fn test_raw_signed_invoice_deserialization ( ) {
1046
1046
use TaggedField :: * ;
1047
1047
use secp256k1:: recovery:: { RecoveryId , RecoverableSignature } ;
1048
- use { SignedRawInvoice , Signature , RawInvoice , RawHrp , RawDataPart , Currency , Sha256 ,
1048
+ use { SignedRawInvoice , InvoiceSignature , RawInvoice , RawHrp , RawDataPart , Currency , Sha256 ,
1049
1049
PositiveTimestamp } ;
1050
1050
1051
1051
assert_eq ! (
@@ -1078,7 +1078,7 @@ mod test {
1078
1078
0x7b , 0x1d , 0x85 , 0x8d , 0xb1 , 0xd1 , 0xf7 , 0xab , 0x71 , 0x37 , 0xdc , 0xb7 ,
1079
1079
0x83 , 0x5d , 0xb2 , 0xec , 0xd5 , 0x18 , 0xe1 , 0xc9
1080
1080
] ,
1081
- signature: Signature ( RecoverableSignature :: from_compact(
1081
+ signature: InvoiceSignature ( RecoverableSignature :: from_compact(
1082
1082
& [
1083
1083
0x38u8 , 0xec , 0x68 , 0x91 , 0x34 , 0x5e , 0x20 , 0x41 , 0x45 , 0xbe , 0x8a ,
1084
1084
0x3a , 0x99 , 0xde , 0x38 , 0xe9 , 0x8a , 0x39 , 0xd6 , 0xa5 , 0x69 , 0x43 ,
0 commit comments