Skip to content

Commit

Permalink
fix: workflows and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmardefago committed Apr 4, 2024
1 parent e88ee85 commit aa194b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/subgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
registry-url: https://registry.npmjs.org
- name: test
working-directory: ./packages/subgraph
Expand Down
9 changes: 5 additions & 4 deletions crates/encoding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ impl Encoder {
self.add_network(id);
}

self.compressed.push(CompressedMessage::RegisterNetworksAndAliases {
remove: remove.clone(),
add: add.clone(),
});
self.compressed
.push(CompressedMessage::RegisterNetworksAndAliases {
remove: remove.clone(),
add: add.clone(),
});
}
};
Ok(())
Expand Down
6 changes: 5 additions & 1 deletion crates/encoding/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ fn serialize_register_networks(add: &[String], remove: &[NetworkIndex], bytes: &
}
}

fn serialize_register_networks_and_aliases(add: &[(String, String)], remove: &[NetworkIndex], bytes: &mut Vec<u8>) {
fn serialize_register_networks_and_aliases(
add: &[(String, String)],
remove: &[NetworkIndex],
bytes: &mut Vec<u8>,
) {
serialize_u64(remove.len() as u64, bytes);
for id in remove {
// TODO: Compression - could delta encode series here. Probably not worth it.
Expand Down

0 comments on commit aa194b5

Please sign in to comment.