ChorusOne / solido

Lido for Solana is a Lido-DAO governed liquid staking protocol for the Solana blockchain.
https://chorusone.github.io/solido/
GNU General Public License v3.0
101 stars 43 forks source link

`process_withdraw` duplicates `check_mint` check. #560

Open enriquefynn opened 2 years ago

enriquefynn commented 2 years ago

Speaking with kkonevets, thanks for the report 👍, he found out that we check twice for the mint at:

https://github.com/ChorusOne/solido/blob/0d9a19cc030bafc86a138524bf56918e68acf1e5/anker/src/processor.rs#L410

It doesn't impact our deployment 😅 but it does consume a bit more computing, or maybe the compiler is smart enough to remove/optimize this. Anyways we should remove the duplicate check.

ruuda commented 2 years ago

Good find!