Skip to content

Commit 539935c

Browse files
committed
Resign -> re-sign
1 parent d7e800a commit 539935c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

solana-transaction-utils/src/queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ pub async fn create_transaction_queue<T: Send + Clone + 'static + Sync>(
301301
instructions,
302302
tasks,
303303
fee,
304-
resign_count: 0,
304+
re_sign_count: 0,
305305
}).await.expect("send to tx sender");
306306
}
307307
}

solana-transaction-utils/src/sender.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub struct PackedTransactionWithTasks<T: Send + Clone> {
4242
pub instructions: Vec<Instruction>,
4343
pub tasks: Vec<TransactionTask<T>>,
4444
pub fee: u64,
45-
pub resign_count: u32,
45+
pub re_sign_count: u32,
4646
}
4747

4848
#[derive(Debug, Clone)]
@@ -67,7 +67,7 @@ pub struct TransactionSender<T: Send + Clone + Sync> {
6767
tpu_client: Option<QuicTpuClient>,
6868
result_tx: Sender<CompletedTransactionTask<T>>,
6969
payer: Arc<Keypair>,
70-
max_resign_count: u32,
70+
max_re_sign_count: u32,
7171
}
7272

7373
pub async fn spawn_background_tasks(
@@ -107,7 +107,7 @@ impl<T: Send + Clone + Sync> TransactionSender<T> {
107107
ws_url: String,
108108
payer: Arc<Keypair>,
109109
result_tx: Sender<CompletedTransactionTask<T>>,
110-
max_resign_count: u32,
110+
max_re_sign_count: u32,
111111
) -> Result<Self, Error> {
112112
// Initialize blockhash data
113113
let (blockhash, last_valid_block_height) = rpc_client
@@ -141,7 +141,7 @@ impl<T: Send + Clone + Sync> TransactionSender<T> {
141141
tpu_client,
142142
result_tx,
143143
payer,
144-
max_resign_count,
144+
max_re_sign_count,
145145
})
146146
}
147147

@@ -150,7 +150,7 @@ impl<T: Send + Clone + Sync> TransactionSender<T> {
150150
packed: &PackedTransactionWithTasks<T>,
151151
) -> Result<(), Error> {
152152
// Check if transaction has been resigned too many times
153-
if packed.resign_count >= self.max_resign_count {
153+
if packed.re_sign_count >= self.max_re_sign_count {
154154
return Err(Error::StaleTransaction);
155155
}
156156

@@ -265,7 +265,7 @@ impl<T: Send + Clone + Sync> TransactionSender<T> {
265265

266266
// Create new packed transaction with incremented resign count
267267
let mut new_packed = data.packed_tx.clone();
268-
new_packed.resign_count += 1;
268+
new_packed.re_sign_count += 1;
269269

270270
if let Err(e) = self.process_packed_tx(&new_packed).await {
271271
// Handle processing error by notifying all tasks

tuktuk-crank-turner/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ impl Cli {
170170
solana_ws_url.clone(),
171171
payer.clone(),
172172
handles.result_sender.clone(),
173-
settings.sender_max_resign_count,
173+
settings.sender_max_re_sign_count,
174174
)
175175
.await
176176
.expect("create sender");

tuktuk-crank-turner/src/settings.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ pub struct Settings {
2525
pub metrics_port: u16,
2626
#[serde(default = "default_recent_attempts_window")]
2727
pub recent_attempts_window: usize,
28-
#[serde(default = "default_sender_max_resign_count")]
29-
pub sender_max_resign_count: u32,
28+
#[serde(default = "default_sender_max_re_sign_count")]
29+
pub sender_max_re_sign_count: u32,
3030
}
3131

32-
fn default_sender_max_resign_count() -> u32 {
32+
fn default_sender_max_re_sign_count() -> u32 {
3333
2
3434
}
3535

0 commit comments

Comments
 (0)