diff --git a/src/fiber/graph.rs b/src/fiber/graph.rs index aa5aba6a8..a61c972bb 100644 --- a/src/fiber/graph.rs +++ b/src/fiber/graph.rs @@ -205,8 +205,7 @@ where } pub(crate) fn load_from_store(&mut self) { - let channels = self.store.get_channels(None); - for channel in channels.iter() { + for channel in self.store.get_channels(None).iter() { if self.best_height < channel.funding_tx_block_number() { self.best_height = channel.funding_tx_block_number(); } diff --git a/src/rpc/README.md b/src/rpc/README.md index cc56aa809..9f140e95d 100644 --- a/src/rpc/README.md +++ b/src/rpc/README.md @@ -621,8 +621,8 @@ The Channel information. * `funding_tx_index` - u32, The index of the funding transaction. * `node1` - Pubkey, The node ID of the first node. * `node2` - Pubkey, The node ID of the second node. -* `last_updated_timestamp` - `Option`, The last updated timestamp of the channel. -* `created_timestamp` - u64, The created timestamp of the channel. +* `last_updated_timestamp` - `Option`, The last updated timestamp of the channel, milliseconds since UNIX epoch. +* `created_timestamp` - u64, The created timestamp of the channel, milliseconds since UNIX epoch. * `node1_to_node2_fee_rate` - `Option`, The fee rate from node 1 to node 2. * `node2_to_node1_fee_rate` - `Option`, The fee rate from node 2 to node 1. * `capacity` - u128, The capacity of the channel. diff --git a/src/rpc/graph.rs b/src/rpc/graph.rs index 8d0f4eefb..376c2877a 100644 --- a/src/rpc/graph.rs +++ b/src/rpc/graph.rs @@ -154,10 +154,11 @@ struct ChannelInfo { node1: Pubkey, /// The node ID of the second node. node2: Pubkey, - /// The last updated timestamp of the channel. + /// The last updated timestamp of the channel, milliseconds since UNIX epoch. #[serde_as(as = "Option")] last_updated_timestamp: Option, - /// The created timestamp of the channel. + /// The created timestamp of the channel, milliseconds since UNIX epoch. + #[serde_as(as = "U64Hex")] created_timestamp: u64, #[serde_as(as = "Option")] /// The fee rate from node 1 to node 2.