Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Process poda in fees tests #728

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/mempool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,15 @@ pub mod test {
.expect("fail to handle new transaction");
}

pub fn handle_poda_update(
&mut self,
net_message: Signed<MempoolNetMessage, ValidatorSignature>,
) {
self.mempool
.handle_net_message(net_message)
.expect("fail to handle net message");
}

pub async fn handle_processed_data_proposals(&mut self) {
let event = self
.mempool_internal_event_receiver
Expand Down
22 changes: 12 additions & 10 deletions src/tests/autobahn_testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,10 @@ async fn protocol_fees() {
Some(dp_size_2)
);

// Process poda update coming from node2
let poda_update = node2.mempool_ctx.assert_broadcast("poda update");
node1.mempool_ctx.handle_poda_update(poda_update);

// Let's do a consensus round

node1.start_round_with_cut_from_mempool().await;
Expand All @@ -1118,21 +1122,19 @@ async fn protocol_fees() {
_ => panic!("Should be a Prepare"),
};

// TODO: should be 2, but bug in QueryNewCut
//assert_eq!(cp.staking_actions.len(), 2);
assert_eq!(cp.staking_actions.len(), 1);
assert_eq!(cp.staking_actions.len(), 2);
assert_eq!(
cp.staking_actions[0],
ConsensusStakingAction::PayFeesForDaDi {
disseminator: node2.mempool_ctx.validator_pubkey().clone(),
cumul_size: dp_size_2
}
);
assert_eq!(
cp.staking_actions[1],
ConsensusStakingAction::PayFeesForDaDi {
disseminator: node1.mempool_ctx.validator_pubkey().clone(),
cumul_size: dp_size_1
}
);
//assert_eq!(
// cp.staking_actions[1],
// ConsensusStakingAction::PayFeesForDaDi {
// disseminator: node2.mempool_ctx.validator_pubkey().clone(),
// cumul_size: dp_size_2
// }
//);
}
Loading