Fixed workers test. connect to Write Address for lite_client
This commit is contained in:
parent
15b8780422
commit
02ef2996b1
|
@ -1,3 +1,4 @@
|
|||
use anyhow::Context;
|
||||
use lite_client::LiteClient;
|
||||
use log::info;
|
||||
use solana_client::nonblocking::rpc_client::RpcClient;
|
||||
|
@ -15,7 +16,10 @@ pub async fn new_funded_payer(lite_client: &LiteClient, amount: u64) -> anyhow::
|
|||
let payer_pubkey = payer.pubkey().to_string();
|
||||
|
||||
// request airdrop to payer
|
||||
let airdrop_sig = lite_client.request_airdrop(&payer.pubkey(), amount).await?;
|
||||
let airdrop_sig = lite_client
|
||||
.request_airdrop(&payer.pubkey(), amount)
|
||||
.await
|
||||
.context("requesting air drop")?;
|
||||
|
||||
info!("Air Dropping {payer_pubkey} with {amount}L");
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ use lite_client::LiteClient;
|
|||
use lite_rpc::{
|
||||
encoding::BinaryEncoding,
|
||||
workers::{BlockListener, TxSender},
|
||||
DEFAULT_RPC_ADDR, DEFAULT_WS_ADDR,
|
||||
DEFAULT_RPC_ADDR, DEFAULT_WS_ADDR, DEFAULT_LITE_RPC_ADDR,
|
||||
};
|
||||
use solana_client::nonblocking::{rpc_client::RpcClient, tpu_client::TpuClient};
|
||||
|
||||
|
@ -16,7 +16,7 @@ use solana_sdk::{commitment_config::CommitmentConfig, native_token::LAMPORTS_PER
|
|||
#[tokio::test]
|
||||
async fn send_and_confirm_txs() {
|
||||
let rpc_client = Arc::new(RpcClient::new(DEFAULT_RPC_ADDR.to_string()));
|
||||
let lite_client = LiteClient(RpcClient::new(DEFAULT_RPC_ADDR.to_string()));
|
||||
let lite_client = LiteClient(RpcClient::new(DEFAULT_LITE_RPC_ADDR.to_string()));
|
||||
|
||||
let tpu_client = Arc::new(
|
||||
TpuClient::new(rpc_client.clone(), DEFAULT_WS_ADDR, Default::default())
|
||||
|
|
Loading…
Reference in New Issue