From 6d3b677948e1ca156e3f25e5839fd674e9e70b56 Mon Sep 17 00:00:00 2001 From: Lucas Meier Date: Fri, 7 Feb 2025 14:11:41 -0800 Subject: [PATCH] bug: LQT: calculate effect hash *correctly* for votes Previously we were calculating the effect hash over the auth data too (woops!) --- .../funding/src/liquidity_tournament/action/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/core/component/funding/src/liquidity_tournament/action/mod.rs b/crates/core/component/funding/src/liquidity_tournament/action/mod.rs index 34a95c2409..c1c1c9a2a4 100644 --- a/crates/core/component/funding/src/liquidity_tournament/action/mod.rs +++ b/crates/core/component/funding/src/liquidity_tournament/action/mod.rs @@ -96,6 +96,12 @@ impl From for pb::LiquidityTournamentVoteBody { } } +impl EffectingData for LiquidityTournamentVoteBody { + fn effect_hash(&self) -> EffectHash { + EffectHash::from_proto_effecting_data(&self.to_proto()) + } +} + /// The action used to vote in the liquidity tournament. /// /// This vote is towards a particular asset whose liquidity should be incentivized, @@ -148,7 +154,7 @@ impl From for pb::ActionLiquidityTournamentVote { impl EffectingData for ActionLiquidityTournamentVote { fn effect_hash(&self) -> EffectHash { - EffectHash::from_proto_effecting_data(&self.to_proto()) + self.body.effect_hash() } }