diff --git a/src/lib.rs b/src/lib.rs index 97a179c95f..0bc8b86a02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1540,6 +1540,7 @@ impl Node { .try_into() .expect("a 16-byte slice should convert into a [u8; 16]"), ); + self.runtime.block_on(self.peer_store.add_peer(peer_info.clone()))?; // Register the fee-rate override before creating the channel, as the // `FundingGenerationReady` event may be handled before `create_channel` returns. @@ -1577,7 +1578,6 @@ impl Node { zero_reserve_string, peer_info.node_id ); - self.runtime.block_on(self.peer_store.add_peer(peer_info))?; Ok(UserChannelId(user_channel_id)) }, Err(e) => {