Skip to content

Commit e3d9c8b

Browse files
committed
Rebase adaptation
1 parent 8a8903e commit e3d9c8b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lightning/src/ln/msgs.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ pub struct Splice {
451451
/// The channel ID where splicing is intended
452452
pub channel_id: ChannelId,
453453
/// The genesis hash of the blockchain where the channel is intended to be spliced
454-
pub chain_hash: BlockHash,
454+
pub chain_hash: ChainHash,
455455
/// The intended change in channel capacity: the amount to be added (positive value)
456456
/// or removed (negative value) by the sender (splice initiator) by splicing into/from the channel.
457457
pub relative_satoshis: i64,
@@ -471,7 +471,7 @@ pub struct SpliceAck {
471471
/// The channel ID where splicing is intended
472472
pub channel_id: ChannelId,
473473
/// The genesis hash of the blockchain where the channel is intended to be spliced
474-
pub chain_hash: BlockHash,
474+
pub chain_hash: ChainHash,
475475
/// The intended change in channel capacity: the amount to be added (positive value)
476476
/// or removed (negative value) by the sender (splice acceptor) by splicing into/from the channel.
477477
pub relative_satoshis: i64,
@@ -3445,29 +3445,29 @@ mod tests {
34453445
let secp_ctx = Secp256k1::new();
34463446
let (_, pubkey_1,) = get_keys_from!("0101010101010101010101010101010101010101010101010101010101010101", secp_ctx);
34473447
let splice = msgs::Splice {
3448-
chain_hash: BlockHash::from_hex("6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000").unwrap(),
3448+
chain_hash: ChainHash::from_hex("6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000").unwrap(),
34493449
channel_id: ChannelId::from_bytes([2; 32]),
34503450
relative_satoshis: 123456,
34513451
funding_feerate_perkw: 2000,
34523452
locktime: 0,
34533453
funding_pubkey: pubkey_1,
34543454
};
34553455
let encoded_value = splice.encode();
3456-
assert_eq!(hex::encode(encoded_value), "0202020202020202020202020202020202020202020202020202020202020202000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f000000000001e240000007d000000000031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f");
3456+
assert_eq!(hex::encode(encoded_value), "02020202020202020202020202020202020202020202020202020202020202026fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000000000000001e240000007d000000000031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f");
34573457
}
34583458

34593459
#[test]
34603460
fn encoding_splice_ack() {
34613461
let secp_ctx = Secp256k1::new();
34623462
let (_, pubkey_1,) = get_keys_from!("0101010101010101010101010101010101010101010101010101010101010101", secp_ctx);
34633463
let splice = msgs::SpliceAck {
3464-
chain_hash: BlockHash::from_hex("6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000").unwrap(),
3464+
chain_hash: ChainHash::from_hex("6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000").unwrap(),
34653465
channel_id: ChannelId::from_bytes([2; 32]),
34663466
relative_satoshis: 123456,
34673467
funding_pubkey: pubkey_1,
34683468
};
34693469
let encoded_value = splice.encode();
3470-
assert_eq!(hex::encode(encoded_value), "0202020202020202020202020202020202020202020202020202020202020202000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f000000000001e240031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f");
3470+
assert_eq!(hex::encode(encoded_value), "02020202020202020202020202020202020202020202020202020202020202026fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000000000000001e240031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f");
34713471
}
34723472

34733473
#[test]

0 commit comments

Comments
 (0)