Convert a runtime network to a storage `Registry`, returning the declarations alongside it. Proto-node declaration content is no longer stored in the registry (it lives in a byte store); these tests have no byte store, so they keep the extracted bytes in hand and rebuild a `Declarations` map for the back-conversion.
(network: &NodeNetwork)
| 23 | /// these tests have no byte store, so they keep the extracted bytes in hand and rebuild a |
| 24 | /// `Declarations` map for the back-conversion. |
| 25 | fn to_registry(network: &NodeNetwork) -> (Registry, crate::Declarations) { |
| 26 | let conversion = Registry::convert_from_runtime(network, &crate::NoMetadata, &Default::default(), PeerId(0)).expect("Failed to convert NodeNetwork to Registry"); |
| 27 | let declarations = conversion.declarations().expect("rebuild declarations"); |
| 28 | (conversion.registry, declarations) |
| 29 | } |
| 30 | |
| 31 | /// A one-node network whose single node references `id` via a `TaggedValue::Resource` input, so |
| 32 | /// `convert_resources` (which only snapshots network-referenced resources) carries the resource. |
no test coverage detected