Skip to content

Commit 212ca55

Browse files
committed
fix: address copilot comments
1 parent 3c87d61 commit 212ca55

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

modules/peer_network_interface/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The peer network interface module uses the ChainSync and BlockFetch protocols to fetch blocks from one of several upstream sources. It chooses one peer to treat as the "preferred" chain to follow, but will gracefully switch which peer it follows during network issues.
44

5-
It can either run independently, either from the origin or current tip, or
5+
It can either run independently, from the origin or current tip, or
66
be triggered by a Mithril snapshot event (the default) where it starts from
77
where the snapshot left off, and follows the chain from there.
88

modules/peer_network_interface/src/chain_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl ChainState {
204204
self.published_blocks.push_back(published);
205205
self.rolled_back = false;
206206
while self.published_blocks.len() > SECURITY_PARAMETER_K as usize {
207-
let Some((slot, _)) = self.published_blocks.pop_back() else {
207+
let Some((slot, _)) = self.published_blocks.pop_front() else {
208208
break;
209209
};
210210
self.blocks.remove(&slot);

modules/peer_network_interface/src/network.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ impl NetworkManager {
8181
match event {
8282
NetworkEvent::PeerUpdate { peer, event } => {
8383
self.handle_peer_update(peer, event);
84-
if true {
85-
self.publish_blocks().await?;
86-
}
84+
self.publish_blocks().await?;
8785
}
8886
}
8987
}

processes/omnibus/omnibus-local.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
network-name = "preview" # "sanchonet", "preview", "mainnet"
55

66
#[module.mithril-snapshot-fetcher]
7-
#Turned off with SanchoNet
8-
#aggregator-url = "https://aggregator.release-mainnet.api.mithril.network/aggregator"
9-
#genesis-key = "5b3139312c36362c3134302c3138352c3133382c31312c3233372c3230372c3235302c3134342c32372c322c3138382c33302c31322c38312c3135352c3230342c31302c3137392c37352c32332c3133382c3139362c3231372c352c31342c32302c35372c37392c33392c3137365d"
7+
#aggregator-url = "https://aggregator.pre-release-preview.api.mithril.network/aggregator"
8+
#genesis-key = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d"
109
#download = false
1110

1211
[module.rest-blockfrost]
@@ -55,7 +54,7 @@ store-stake-addresses = false
5554

5655
[module.parameters-state]
5756
store-history = false
58-
network-name = "sanchonet" # "sanchonet", "mainnet"
57+
network-name = "preview" # "sanchonet", "preview", "mainnet"
5958

6059
[module.stake-delta-filter]
6160
cache-mode = "write" # "predefined", "read", "write", "write-if-absent"

0 commit comments

Comments
 (0)