Skip to content

Commit

Permalink
Merge branch 'fraccaman/fix-proposal-loading' (#2679)
Browse files Browse the repository at this point in the history
* origin/fraccaman/fix-proposal-loading:
  added changelog
  use btreeset instead of hashset
  • Loading branch information
Gianmarco Fraccaroli authored and tzemanovic committed Feb 22, 2024
2 parents f4b0caf + 7aa6fa8 commit c26ea51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2679-fix-proposal-loading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fixing the order of proposal execution to be deterministic.
([\#2679](https://github.com/anoma/namada/pull/2679))
2 changes: 1 addition & 1 deletion crates/apps/src/lib/node/ledger/shell/finalize_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ fn pos_votes_from_abci(
/// are covered by the e2e tests.
#[cfg(test)]
mod test_finalize_block {
use std::collections::{BTreeMap, BTreeSet, HashMap};
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use std::num::NonZeroU64;
use std::str::FromStr;

Expand Down
6 changes: 3 additions & 3 deletions crates/apps/src/lib/node/ledger/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub mod testing;
pub mod utils;
mod vote_extensions;

use std::collections::{BTreeSet, HashSet};
use std::collections::BTreeSet;
use std::convert::{TryFrom, TryInto};
use std::mem;
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -357,7 +357,7 @@ where
/// queried for reading values.
storage_read_past_height_limit: Option<u64>,
/// Proposal execution tracking
pub proposal_data: HashSet<u64>,
pub proposal_data: BTreeSet<u64>,
/// Log of events emitted by `FinalizeBlock` ABCI calls.
event_log: EventLog,
}
Expand Down Expand Up @@ -533,7 +533,7 @@ where
tx_wasm_compilation_cache as usize,
),
storage_read_past_height_limit,
proposal_data: HashSet::new(),
proposal_data: BTreeSet::new(),
// TODO: config event log params
event_log: EventLog::default(),
};
Expand Down

0 comments on commit c26ea51

Please sign in to comment.