File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ pub fn app_version() -> String {
24
24
25
25
pub struct RpcClients {
26
26
pub default : RpcClient ,
27
+
28
+ // Optional `RpcClient` for use only for sending transactions.
29
+ // If `None` then the `default` client is used for sending transactions
27
30
pub send : Option < RpcClient > ,
28
31
}
29
32
@@ -41,7 +44,8 @@ pub fn send_transaction_until_expired(
41
44
} ,
42
45
} ;
43
46
44
- let rpc_client = rpc_clients. send . as_ref ( ) . unwrap_or ( & rpc_clients. default ) ;
47
+ let send_rpc_client = rpc_clients. send . as_ref ( ) . unwrap_or ( & rpc_clients. default ) ;
48
+ let rpc_client = & rpc_clients. default ;
45
49
46
50
let mut last_send_attempt = None ;
47
51
@@ -76,7 +80,7 @@ pub fn send_transaction_until_expired(
76
80
"Sending transaction {} [{valid_msg}]" ,
77
81
transaction. get_signature( )
78
82
) ;
79
- if let Err ( err) = rpc_client . send_transaction_with_config ( transaction, config) {
83
+ if let Err ( err) = send_rpc_client . send_transaction_with_config ( transaction, config) {
80
84
println ! ( "Transaction failed to send: {err:?}" ) ;
81
85
}
82
86
last_send_attempt = Some ( Instant :: now ( ) ) ;
You can’t perform that action at this time.
0 commit comments