Add TPU client for sending txs to the current leader tpu port (#16736)

* Add TPU client for sending txs to the current leader tpu port

* Update tpu_client.rs
This commit is contained in:
Justin Starry
2021-04-23 09:35:12 +08:00
committed by GitHub
parent fc12841d95
commit 75b8434b76
10 changed files with 523 additions and 140 deletions

View File

@@ -124,6 +124,7 @@ impl RpcSender for MockSender {
}
RpcRequest::GetTransactionCount => Value::Number(Number::from(1234)),
RpcRequest::GetSlot => Value::Number(Number::from(0)),
RpcRequest::GetMaxShredInsertSlot => Value::Number(Number::from(0)),
RpcRequest::RequestAirdrop => Value::String(Signature::new(&[8; 64]).to_string()),
RpcRequest::SendTransaction => {
let signature = if self.url == "malicious" {