Skip to content

Commit

Permalink
Skip RPC preflight to align with the other Client implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jun 2, 2020
1 parent 202512d commit bd1f9d3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tokens/src/thin_client.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use solana_client::rpc_client::RpcClient;
use solana_client::{rpc_client::RpcClient, rpc_config::RpcSendTransactionConfig};
use solana_runtime::bank_client::BankClient;
use solana_sdk::{
account::Account,
Expand Down Expand Up @@ -32,8 +32,13 @@ pub trait Client {

impl Client for RpcClient {
fn send_transaction1(&self, transaction: Transaction) -> Result<Signature> {
self.send_transaction(&transaction)
.map_err(|e| TransportError::Custom(e.to_string()))
self.send_transaction_with_config(
&transaction,
RpcSendTransactionConfig {
skip_preflight: true,
},
)
.map_err(|e| TransportError::Custom(e.to_string()))
}

fn get_signature_statuses1(
Expand Down

0 comments on commit bd1f9d3

Please sign in to comment.