File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,19 @@ pub trait KVStore {
163
163
) -> Result < Vec < String > , io:: Error > ;
164
164
}
165
165
166
+ /// Provides additional interface methods that are required for [`KVStore`]-to-[`KVStore`]
167
+ /// data migration.
168
+ pub trait MigratableKVStore : KVStore {
169
+ /// Returns *all* known keys as a list of `primary_namespace`, `secondary_namespace`, `key` tuples.
170
+ ///
171
+ /// This is useful for migrating data from [`KVStore`] implementation to [`KVStore`]
172
+ /// implementation.
173
+ ///
174
+ /// Must exhaustively return all entries known to the store to ensure no data is missed, but
175
+ /// may return the items in arbitrary order.
176
+ fn list_all_keys ( & self ) -> Result < Vec < ( String , String , String ) > , io:: Error > ;
177
+ }
178
+
166
179
/// Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk.
167
180
///
168
181
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
You can’t perform that action at this time.
0 commit comments