This reverts commit 27b2561650
.
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -5651,7 +5651,6 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"smpl_jwt",
|
"smpl_jwt",
|
||||||
"solana-metrics",
|
|
||||||
"solana-sdk",
|
"solana-sdk",
|
||||||
"solana-storage-proto",
|
"solana-storage-proto",
|
||||||
"solana-transaction-status",
|
"solana-transaction-status",
|
||||||
|
@ -24,7 +24,6 @@ rand_core = "0.6.2"
|
|||||||
serde = "1.0.122"
|
serde = "1.0.122"
|
||||||
serde_derive = "1.0.103"
|
serde_derive = "1.0.103"
|
||||||
smpl_jwt = "0.6.0"
|
smpl_jwt = "0.6.0"
|
||||||
solana-metrics = { path = "../metrics", version = "=1.8.6" }
|
|
||||||
solana-sdk = { path = "../sdk", version = "=1.8.6" }
|
solana-sdk = { path = "../sdk", version = "=1.8.6" }
|
||||||
solana-storage-proto = { path = "../storage-proto", version = "=1.8.6" }
|
solana-storage-proto = { path = "../storage-proto", version = "=1.8.6" }
|
||||||
solana-transaction-status = { path = "../transaction-status", version = "=1.8.6" }
|
solana-transaction-status = { path = "../transaction-status", version = "=1.8.6" }
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
use {
|
use {
|
||||||
log::*,
|
log::*,
|
||||||
serde::{Deserialize, Serialize},
|
serde::{Deserialize, Serialize},
|
||||||
solana_metrics::inc_new_counter_debug,
|
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
clock::{Slot, UnixTimestamp},
|
clock::{Slot, UnixTimestamp},
|
||||||
deserialize_utils::default_on_eof,
|
deserialize_utils::default_on_eof,
|
||||||
@ -25,9 +24,6 @@ use {
|
|||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate solana_metrics;
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde_derive;
|
extern crate serde_derive;
|
||||||
|
|
||||||
@ -353,8 +349,6 @@ impl LedgerStorage {
|
|||||||
|
|
||||||
/// Return the available slot that contains a block
|
/// Return the available slot that contains a block
|
||||||
pub async fn get_first_available_block(&self) -> Result<Option<Slot>> {
|
pub async fn get_first_available_block(&self) -> Result<Option<Slot>> {
|
||||||
debug!("LedgerStorage::get_first_available_block request received");
|
|
||||||
inc_new_counter_debug!("storage-bigtable-query", 1);
|
|
||||||
let mut bigtable = self.connection.client();
|
let mut bigtable = self.connection.client();
|
||||||
let blocks = bigtable.get_row_keys("blocks", None, None, 1).await?;
|
let blocks = bigtable.get_row_keys("blocks", None, None, 1).await?;
|
||||||
if blocks.is_empty() {
|
if blocks.is_empty() {
|
||||||
@ -369,11 +363,6 @@ impl LedgerStorage {
|
|||||||
/// limit: stop after this many slots have been found; if limit==0, all records in the table
|
/// limit: stop after this many slots have been found; if limit==0, all records in the table
|
||||||
/// after start_slot will be read
|
/// after start_slot will be read
|
||||||
pub async fn get_confirmed_blocks(&self, start_slot: Slot, limit: usize) -> Result<Vec<Slot>> {
|
pub async fn get_confirmed_blocks(&self, start_slot: Slot, limit: usize) -> Result<Vec<Slot>> {
|
||||||
debug!(
|
|
||||||
"LedgerStorage::get_confirmed_blocks request received: {:?} {:?}",
|
|
||||||
start_slot, limit
|
|
||||||
);
|
|
||||||
inc_new_counter_debug!("storage-bigtable-query", 1);
|
|
||||||
let mut bigtable = self.connection.client();
|
let mut bigtable = self.connection.client();
|
||||||
let blocks = bigtable
|
let blocks = bigtable
|
||||||
.get_row_keys(
|
.get_row_keys(
|
||||||
@ -388,11 +377,6 @@ impl LedgerStorage {
|
|||||||
|
|
||||||
/// Fetch the confirmed block from the desired slot
|
/// Fetch the confirmed block from the desired slot
|
||||||
pub async fn get_confirmed_block(&self, slot: Slot) -> Result<ConfirmedBlock> {
|
pub async fn get_confirmed_block(&self, slot: Slot) -> Result<ConfirmedBlock> {
|
||||||
debug!(
|
|
||||||
"LedgerStorage::get_confirmed_block request received: {:?}",
|
|
||||||
slot
|
|
||||||
);
|
|
||||||
inc_new_counter_debug!("storage-bigtable-query", 1);
|
|
||||||
let mut bigtable = self.connection.client();
|
let mut bigtable = self.connection.client();
|
||||||
let block_cell_data = bigtable
|
let block_cell_data = bigtable
|
||||||
.get_protobuf_or_bincode_cell::<StoredConfirmedBlock, generated::ConfirmedBlock>(
|
.get_protobuf_or_bincode_cell::<StoredConfirmedBlock, generated::ConfirmedBlock>(
|
||||||
@ -413,11 +397,6 @@ impl LedgerStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_signature_status(&self, signature: &Signature) -> Result<TransactionStatus> {
|
pub async fn get_signature_status(&self, signature: &Signature) -> Result<TransactionStatus> {
|
||||||
debug!(
|
|
||||||
"LedgerStorage::get_signature_status request received: {:?}",
|
|
||||||
signature
|
|
||||||
);
|
|
||||||
inc_new_counter_debug!("storage-bigtable-query", 1);
|
|
||||||
let mut bigtable = self.connection.client();
|
let mut bigtable = self.connection.client();
|
||||||
let transaction_info = bigtable
|
let transaction_info = bigtable
|
||||||
.get_bincode_cell::<TransactionInfo>("tx", signature.to_string())
|
.get_bincode_cell::<TransactionInfo>("tx", signature.to_string())
|
||||||
@ -434,11 +413,6 @@ impl LedgerStorage {
|
|||||||
&self,
|
&self,
|
||||||
signature: &Signature,
|
signature: &Signature,
|
||||||
) -> Result<Option<ConfirmedTransaction>> {
|
) -> Result<Option<ConfirmedTransaction>> {
|
||||||
debug!(
|
|
||||||
"LedgerStorage::get_confirmed_transaction request received: {:?}",
|
|
||||||
signature
|
|
||||||
);
|
|
||||||
inc_new_counter_debug!("storage-bigtable-query", 1);
|
|
||||||
let mut bigtable = self.connection.client();
|
let mut bigtable = self.connection.client();
|
||||||
|
|
||||||
// Figure out which block the transaction is located in
|
// Figure out which block the transaction is located in
|
||||||
@ -494,11 +468,6 @@ impl LedgerStorage {
|
|||||||
u32, /*slot index*/
|
u32, /*slot index*/
|
||||||
)>,
|
)>,
|
||||||
> {
|
> {
|
||||||
debug!(
|
|
||||||
"LedgerStorage::get_confirmed_signatures_for_address request received: {:?}",
|
|
||||||
address
|
|
||||||
);
|
|
||||||
inc_new_counter_debug!("storage-bigtable-query", 1);
|
|
||||||
let mut bigtable = self.connection.client();
|
let mut bigtable = self.connection.client();
|
||||||
let address_prefix = format!("{}/", address);
|
let address_prefix = format!("{}/", address);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user