Adapt to v1.2
This commit is contained in:
committed by
mergify[bot]
parent
096d9ce5c7
commit
acfd72d7c4
@@ -1,5 +1,5 @@
|
|||||||
|
use crate::commitment::BlockCommitmentCache;
|
||||||
use solana_ledger::blockstore::Blockstore;
|
use solana_ledger::blockstore::Blockstore;
|
||||||
use solana_runtime::commitment::BlockCommitmentCache;
|
|
||||||
use std::{
|
use std::{
|
||||||
sync::atomic::{AtomicBool, Ordering},
|
sync::atomic::{AtomicBool, Ordering},
|
||||||
sync::{Arc, RwLock},
|
sync::{Arc, RwLock},
|
||||||
@@ -49,12 +49,12 @@ impl BigTableUploadService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
let max_confirmed_root = block_commitment_cache
|
let largest_confirmed_root = block_commitment_cache
|
||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.highest_confirmed_root();
|
.largest_confirmed_root();
|
||||||
|
|
||||||
if max_confirmed_root == starting_slot {
|
if largest_confirmed_root == starting_slot {
|
||||||
std::thread::sleep(std::time::Duration::from_secs(1));
|
std::thread::sleep(std::time::Duration::from_secs(1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -63,13 +63,13 @@ impl BigTableUploadService {
|
|||||||
blockstore.clone(),
|
blockstore.clone(),
|
||||||
bigtable_ledger_storage.clone(),
|
bigtable_ledger_storage.clone(),
|
||||||
starting_slot,
|
starting_slot,
|
||||||
Some(max_confirmed_root),
|
Some(largest_confirmed_root),
|
||||||
true,
|
true,
|
||||||
exit.clone(),
|
exit.clone(),
|
||||||
));
|
));
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Ok(()) => starting_slot = max_confirmed_root,
|
Ok(()) => starting_slot = largest_confirmed_root,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
warn!("bigtable: upload_confirmed_blocks: {}", err);
|
warn!("bigtable: upload_confirmed_blocks: {}", err);
|
||||||
std::thread::sleep(std::time::Duration::from_secs(2));
|
std::thread::sleep(std::time::Duration::from_secs(2));
|
||||||
|
|||||||
Reference in New Issue
Block a user