Fix Soyas client to match other SWQOS clients

Previously Soyas returned early on successful send without:
- Any logging
- Polling for transaction confirmation

Now aligned with other SWQOS clients (zeroslot, lightspeed, etc.):
- Proper error handling with reconnect retry
- Always poll for transaction confirmation
- Log confirmation success/failure with elapsed time

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
vibes
2026-01-07 14:52:07 +00:00
co-authored by Claude Opus 4.5
parent 65cb64d08c
commit 7b984231a2
+9 -8
View File
@@ -104,18 +104,19 @@ impl SwqosClientTrait for SoyasClient {
transaction: &VersionedTransaction,
wait_confirmation: bool,
) -> Result<()> {
let start_time = Instant::now();
let signature = transaction.get_signature();
let serialized_tx = bincode::serialize(transaction)?;
let connection = self.connection.load_full();
if Self::try_send_bytes(&connection, &serialized_tx).await.is_ok() {
return Ok(());
if Self::try_send_bytes(&connection, &serialized_tx).await.is_err() {
eprintln!(" [soyas] {} submission failed, reconnecting", trade_type);
self.reconnect().await?;
let connection = self.connection.load_full();
if let Err(e) = Self::try_send_bytes(&connection, &serialized_tx).await {
eprintln!(" [soyas] {} submission failed: {:?}", trade_type, e);
return Err(e.into());
}
}
eprintln!(" [soyas] failed to send transaction; reconnecting");
self.reconnect().await?;
let connection = self.connection.load_full();
Self::try_send_bytes(&connection, &serialized_tx).await?;
let start_time: Instant = Instant::now();
match poll_transaction_confirmation(&self.rpc_client, *signature, wait_confirmation).await {
Ok(_) => (),
Err(e) => {