Skip to content

tweak handling of orders without signing address #546

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

Merged
merged 1 commit into from
Apr 10, 2025
Merged
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
8 changes: 7 additions & 1 deletion crates/rbuilder/src/backtest/redistribute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ fn split_orders_by_identities(

let mut protect_signer_seen = false;

let mut included_without_address = HashSet::default();
for order in &included_orders_available {
let order_id = order.order.id();
let address = match order_redistribution_address(&order.order, protect_signers) {
Expand All @@ -502,7 +503,8 @@ fn split_orders_by_identities(
address
}
None => {
warn!(order = ?order_id, "Included order redistribution address not found");
error!(order = ?order_id, "Included order redistribution address not found");
included_without_address.insert(order_id);
continue;
}
};
Expand All @@ -511,6 +513,10 @@ fn split_orders_by_identities(
orders.push(order_id);
orders_id_to_address.insert(order_id, address);
}
let included_orders_available = included_orders_available
.into_iter()
.filter(|o| !included_without_address.contains(&o.order.id()))
.collect();

for order in &block_data.available_orders {
let id = order.order.id();
Expand Down
Loading