Skip to content

Commit

Permalink
Merge branch 'development' into consensus-sequence-from-foreign-proposal
Browse files Browse the repository at this point in the history
* development:
  fix(consensus)!: substate pledges (tari-project#1119)
  • Loading branch information
sdbondi committed Aug 21, 2024
2 parents bb7b1fc + 7f0a322 commit 9bb4b91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions dan_layer/common_types/src/committee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ impl CommitteeInfo {
self.shard_group.to_substate_address_range(self.num_shards)
}

// TODO: change these to take in a SubstateId
pub fn includes_substate_address(&self, substate_address: &SubstateAddress) -> bool {
let s = substate_address.to_shard(self.num_shards);
self.shard_group.contains(&s)
Expand Down
8 changes: 4 additions & 4 deletions dan_layer/consensus_tests/src/support/executions_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use std::{
sync::{Arc, RwLock},
};

use tari_dan_storage::consensus_models::TransactionExecution;
use tari_dan_storage::consensus_models::BlockTransactionExecution;
use tari_transaction::TransactionId;

type TestExecutionStore = HashMap<TransactionId, TransactionExecution>;
type TestExecutionStore = HashMap<TransactionId, BlockTransactionExecution>;

#[derive(Debug, Clone, Default)]
pub struct TestTransactionExecutionsStore {
Expand All @@ -23,15 +23,15 @@ impl TestTransactionExecutionsStore {
}
}

pub fn insert(&self, execution: TransactionExecution) -> &Self {
pub fn insert(&self, execution: BlockTransactionExecution) -> &Self {
self.transactions
.write()
.unwrap()
.insert(execution.transaction_id, execution);
self
}

pub fn get(&self, transaction_id: &TransactionId) -> Option<TransactionExecution> {
pub fn get(&self, transaction_id: &TransactionId) -> Option<BlockTransactionExecution> {
self.transactions.read().unwrap().get(transaction_id).cloned()
}
}

0 comments on commit 9bb4b91

Please sign in to comment.