start_local_server() now works with Banks > 0
This commit is contained in:
parent
8acc47ee1b
commit
fa4bab4608
|
@ -5,11 +5,7 @@ use futures::{
|
||||||
prelude::stream::{self, StreamExt},
|
prelude::stream::{self, StreamExt},
|
||||||
};
|
};
|
||||||
use solana_banks_interface::{Banks, BanksRequest, BanksResponse, TransactionStatus};
|
use solana_banks_interface::{Banks, BanksRequest, BanksResponse, TransactionStatus};
|
||||||
use solana_runtime::{
|
use solana_runtime::{bank::Bank, bank_forks::BankForks, commitment::BlockCommitmentCache};
|
||||||
bank::Bank,
|
|
||||||
bank_forks::BankForks,
|
|
||||||
commitment::{BlockCommitmentCache, CommitmentSlots},
|
|
||||||
};
|
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
account::Account,
|
account::Account,
|
||||||
clock::Slot,
|
clock::Slot,
|
||||||
|
@ -21,7 +17,6 @@ use solana_sdk::{
|
||||||
transaction::{self, Transaction},
|
transaction::{self, Transaction},
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
|
||||||
io,
|
io,
|
||||||
net::{Ipv4Addr, SocketAddr},
|
net::{Ipv4Addr, SocketAddr},
|
||||||
sync::{
|
sync::{
|
||||||
|
@ -84,11 +79,9 @@ impl BanksServer {
|
||||||
let (transaction_sender, transaction_receiver) = channel();
|
let (transaction_sender, transaction_receiver) = channel();
|
||||||
let bank = bank_forks.read().unwrap().working_bank();
|
let bank = bank_forks.read().unwrap().working_bank();
|
||||||
let slot = bank.slot();
|
let slot = bank.slot();
|
||||||
let block_commitment_cache = Arc::new(RwLock::new(BlockCommitmentCache::new(
|
let block_commitment_cache = Arc::new(RwLock::new(
|
||||||
HashMap::default(),
|
BlockCommitmentCache::new_for_tests_with_slots(slot, slot),
|
||||||
0,
|
));
|
||||||
CommitmentSlots::new_from_slot(slot),
|
|
||||||
)));
|
|
||||||
Builder::new()
|
Builder::new()
|
||||||
.name("solana-bank-forks-client".to_string())
|
.name("solana-bank-forks-client".to_string())
|
||||||
.spawn(move || Self::run(&bank, transaction_receiver))
|
.spawn(move || Self::run(&bank, transaction_receiver))
|
||||||
|
|
Loading…
Reference in New Issue