@@ -136,22 +136,27 @@ struct KeyProvider {
136
136
impl KeysInterface for KeyProvider {
137
137
type ChanKeySigner = EnforcingChannelKeys ;
138
138
139
+ #[ cfg_attr( rustfmt, rustfmt_skip) ]
139
140
fn get_node_secret ( & self ) -> SecretKey {
140
141
SecretKey :: from_slice ( & [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , self . node_id ] ) . unwrap ( )
141
142
}
142
143
143
144
fn get_destination_script ( & self ) -> Script {
144
145
let secp_ctx = Secp256k1 :: signing_only ( ) ;
146
+
147
+ #[ cfg_attr( rustfmt, rustfmt_skip) ]
145
148
let channel_monitor_claim_key = SecretKey :: from_slice ( & [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 2 , self . node_id ] ) . unwrap ( ) ;
146
149
let our_channel_monitor_claim_key_hash = WPubkeyHash :: hash ( & PublicKey :: from_secret_key ( & secp_ctx, & channel_monitor_claim_key) . serialize ( ) ) ;
147
150
Builder :: new ( ) . push_opcode ( opcodes:: all:: OP_PUSHBYTES_0 ) . push_slice ( & our_channel_monitor_claim_key_hash[ ..] ) . into_script ( )
148
151
}
149
152
153
+ #[ cfg_attr( rustfmt, rustfmt_skip) ]
150
154
fn get_shutdown_pubkey ( & self ) -> PublicKey {
151
155
let secp_ctx = Secp256k1 :: signing_only ( ) ;
152
156
PublicKey :: from_secret_key ( & secp_ctx, & SecretKey :: from_slice ( & [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 3 , self . node_id ] ) . unwrap ( ) )
153
157
}
154
158
159
+ #[ cfg_attr( rustfmt, rustfmt_skip) ]
155
160
fn get_channel_keys ( & self , _inbound : bool , channel_value_satoshis : u64 ) -> EnforcingChannelKeys {
156
161
let secp_ctx = Secp256k1 :: signing_only ( ) ;
157
162
EnforcingChannelKeys :: new ( InMemoryChannelKeys :: new (
@@ -166,12 +171,14 @@ impl KeysInterface for KeyProvider {
166
171
) )
167
172
}
168
173
174
+ #[ cfg_attr( rustfmt, rustfmt_skip) ]
169
175
fn get_onion_rand ( & self ) -> ( SecretKey , [ u8 ; 32 ] ) {
170
176
let id = self . session_id . fetch_add ( 1 , atomic:: Ordering :: Relaxed ) ;
171
177
( SecretKey :: from_slice ( & [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , id, 10 , self . node_id ] ) . unwrap ( ) ,
172
178
[ 0 ; 32 ] )
173
179
}
174
180
181
+ #[ cfg_attr( rustfmt, rustfmt_skip) ]
175
182
fn get_channel_id ( & self ) -> [ u8 ; 32 ] {
176
183
let id = self . channel_id . fetch_add ( 1 , atomic:: Ordering :: Relaxed ) ;
177
184
[ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , id, 11 , self . node_id ]
0 commit comments