You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: stacks-signer/src/signerdb.rs
+7-13Lines changed: 7 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -858,18 +858,12 @@ impl SignerDb {
858
858
&self,
859
859
tenure:&ConsensusHash,
860
860
) -> Result<u64,DBError>{
861
-
let query = "SELECT COALESCE((MAX(stacks_height) - MIN(stacks_height) + 1), 0), (SELECT COUNT(consensus_hash) FROM blocks WHERE consensus_hash = ?1) FROM blocks WHERE consensus_hash = ?1 AND state = ?2";
861
+
let query = "SELECT COALESCE((MAX(stacks_height) - MIN(stacks_height) + 1), 0) as block_count FROM blocks WHERE consensus_hash = ?1 AND state = ?2";
862
862
let args = params![tenure,&BlockState::GloballyAccepted.to_string()];
863
-
let block_count_opt:Option<(u64,u64)> = query_row(&self.db, query, args)?;
863
+
let block_count_opt:Option<u64> = query_row(&self.db, query, args)?;
0 commit comments