You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let seed_slice = unsafe_block!("The seed lives as long as `create_ffi_channel_manager` and the length is within the seed" => seed_ptr.as_bytes(seed_len));
124
+
let network = unsafe_block!("We no pointer is not null by function of ffi! macro, and the lifetime will be the same of those with ChannelManager" => network.as_ref().to_network());
125
+
let now = SystemTime::now().duration_since(UNIX_EPOCH)?;
126
+
let logger = unsafe_block!("" => logger.as_arc());
127
+
letmut seed:[u8;32] = Default::default();
128
+
seed.copy_from_slice(seed_slice);
129
+
let keyman = Arc::new(KeysManager::new(&seed, network, logger.clone(), now.as_secs(), now.subsec_nanos()));
130
+
let cfg = unsafe_block!("" => cfg.as_ref());
131
+
let fee_est = unsafe_block!("" => fee_est.as_arc());
132
+
let monitor = unsafe_block!("" => monitor.as_arc());
133
+
let broadcaster = unsafe_block!("" => broadcaster.as_arc());
unsafe_fn!("The pointer must be nonnull and valid for writes" => pubfn init(&mutself, value:T){
175
+
unsafe_fn!("The pointer must be nonnull and valid for writes" =>
176
+
pubfn init(&mutself, value:T){
167
177
ptr::write(self.0, value);
168
-
});
178
+
}
179
+
);
169
180
}
170
181
171
182
impl<'a>Out<'a,u8>{
172
-
unsafe_fn!("The pointer must be nonnull, not overlap the slice, must be valid for the length of the slice, and valid for writes" => pubfn init_bytes(&mutself, value:&[u8]){
183
+
unsafe_fn!("The pointer must be nonnull, not overlap the slice, must be valid for the length of the slice, and valid for writes" =>
unsafe_fn!("The slice must never be read from and must be valid for the length of the slice" => pubfn as_uninit_bytes_mut(&mutself, len:usize) -> &mut[u8]{
189
+
unsafe_fn!("The slice must never be read from and must be valid for the length of the slice" =>
0 commit comments