open_reader_consensus_stubbed --> open_reader_consensus

This commit is contained in:
Jude Nelson
2020-07-17 13:03:48 -04:00
parent 407e077c4e
commit 8df3ae233b
3 changed files with 5 additions and 5 deletions

View File

@@ -675,7 +675,7 @@ impl <'a> SortitionHandleConn <'a> {
}
/// open a reader handle from a consensus hash
pub fn open_reader_consensus_stubbed(connection: &'a SortitionDBConn<'a>, chain_tip: &ConsensusHash) -> Result<SortitionHandleConn<'a>, db_error> {
pub fn open_reader_consensus(connection: &'a SortitionDBConn<'a>, chain_tip: &ConsensusHash) -> Result<SortitionHandleConn<'a>, db_error> {
let sn = match SortitionDB::get_block_snapshot_consensus(&connection.conn, chain_tip)? {
Some(sn) => sn,
None => {

View File

@@ -1089,7 +1089,7 @@ impl StacksChainState {
}
pub fn get_parent_consensus_hash(sort_ic: &SortitionDBConn, parent_block_hash: &BlockHeaderHash, my_consensus_hash: &ConsensusHash) -> Result<Option<ConsensusHash>, Error> {
let sort_handle = SortitionHandleConn::open_reader_consensus_stubbed(sort_ic, my_consensus_hash)?;
let sort_handle = SortitionHandleConn::open_reader_consensus(sort_ic, my_consensus_hash)?;
// find all blocks that we have that could be this block's parent
let sql = "SELECT * FROM snapshots WHERE winning_stacks_block_hash = ?1";
@@ -1114,7 +1114,7 @@ impl StacksChainState {
}
};
let sort_handle = SortitionHandleConn::open_reader_consensus_stubbed(sort_ic, consensus_hash)?;
let sort_handle = SortitionHandleConn::open_reader_consensus(sort_ic, consensus_hash)?;
// find all blocks that we have that could be this block's parent
let sql = "SELECT * FROM snapshots WHERE winning_stacks_block_hash = ?1";
@@ -2258,7 +2258,7 @@ impl StacksChainState {
pub fn preprocess_anchored_block(&mut self, sort_ic: &SortitionDBConn, consensus_hash: &ConsensusHash, burn_header_timestamp: u64, block: &StacksBlock, parent_consensus_hash: &ConsensusHash) -> Result<bool, Error> {
debug!("preprocess anchored block {}/{}", consensus_hash, block.block_hash());
let sort_handle = SortitionHandleConn::open_reader_consensus_stubbed(sort_ic, consensus_hash)?;
let sort_handle = SortitionHandleConn::open_reader_consensus(sort_ic, consensus_hash)?;
// already in queue or already processed?
let index_block_hash = StacksBlockHeader::make_index_block_hash(consensus_hash, &block.block_hash());

View File

@@ -483,7 +483,7 @@ impl Relayer {
};
// find the snapshot of the parent of this block
let db_handle = SortitionHandleConn::open_reader_consensus_stubbed(sort_ic, consensus_hash)?;
let db_handle = SortitionHandleConn::open_reader_consensus(sort_ic, consensus_hash)?;
let parent_block_snapshot = match db_handle.get_block_snapshot_of_parent_stacks_block(consensus_hash, &block.block_hash())? {
Some((_, sn)) => sn,
None => {