Skip to content

Commit

Permalink
fix setting of protocol version in created snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Dec 11, 2024
1 parent ba4687c commit 1ef55f7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/soroban-cli/src/commands/snapshot/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,13 @@ impl Cmd {
}
BucketEntry::Deadentry(k) => (k, None),
BucketEntry::Metaentry(m) => {
snapshot.protocol_version = m.ledger_version;
if m.ledger_version > snapshot.protocol_version {
snapshot.protocol_version = m.ledger_version;
print.infoln(format!(
"Protocol version: {}",
snapshot.protocol_version
));
}
continue;
}
};
Expand Down

0 comments on commit 1ef55f7

Please sign in to comment.