Skip to content

Commit 0dce36e

Browse files
committed
rename misleading globally_signed with globally_accepted
1 parent 6b3114b commit 0dce36e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

stacks-signer/src/chainstate.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,18 +453,18 @@ impl SortitionsView {
453453
}
454454

455455
// disallow reorg if more than one block has already been signed
456-
let globally_signed_blocks =
457-
signer_db.get_globally_signed_block_count_in_tenure(&tenure.consensus_hash)?;
458-
if globally_signed_blocks > 1 {
456+
let globally_accepted_blocks =
457+
signer_db.get_globally_accepted_block_count_in_tenure(&tenure.consensus_hash)?;
458+
if globally_accepted_blocks > 1 {
459459
warn!(
460-
"Miner is not building off of most recent tenure, but a tenure they attempted to reorg has already more than one signed block.";
460+
"Miner is not building off of most recent tenure, but a tenure they attempted to reorg has already more than one globally accepted block.";
461461
"proposed_block_consensus_hash" => %block.header.consensus_hash,
462462
"proposed_block_signer_sighash" => %block.header.signer_signature_hash(),
463463
"parent_tenure" => %sortition_state.parent_tenure_id,
464464
"last_sortition" => %sortition_state.prior_sortition,
465465
"violating_tenure_id" => %tenure.consensus_hash,
466466
"violating_tenure_first_block_id" => ?tenure.first_block_mined,
467-
"globally_signed_blocks" => globally_signed_blocks,
467+
"globally_accepted_blocks" => globally_accepted_blocks,
468468
);
469469
return Ok(false);
470470
}

stacks-signer/src/signerdb.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,8 @@ impl SignerDb {
826826
try_deserialize(result)
827827
}
828828

829-
/// Return the count of globally signed blocks in a tenure (identified by its consensus hash)
830-
pub fn get_globally_signed_block_count_in_tenure(
829+
/// Return the count of globally accepted blocks in a tenure (identified by its consensus hash)
830+
pub fn get_globally_accepted_block_count_in_tenure(
831831
&self,
832832
tenure: &ConsensusHash,
833833
) -> Result<i64, DBError> {
@@ -2007,7 +2007,7 @@ mod tests {
20072007
});
20082008

20092009
assert_eq!(
2010-
db.get_globally_signed_block_count_in_tenure(&consensus_hash_1)
2010+
db.get_globally_accepted_block_count_in_tenure(&consensus_hash_1)
20112011
.unwrap(),
20122012
0
20132013
);
@@ -2018,7 +2018,7 @@ mod tests {
20182018
db.insert_block(&block_info).unwrap();
20192019

20202020
assert_eq!(
2021-
db.get_globally_signed_block_count_in_tenure(&consensus_hash_1)
2021+
db.get_globally_accepted_block_count_in_tenure(&consensus_hash_1)
20222022
.unwrap(),
20232023
1
20242024
);
@@ -2034,7 +2034,7 @@ mod tests {
20342034
db.insert_block(&block_info).unwrap();
20352035

20362036
assert_eq!(
2037-
db.get_globally_signed_block_count_in_tenure(&consensus_hash_1)
2037+
db.get_globally_accepted_block_count_in_tenure(&consensus_hash_1)
20382038
.unwrap(),
20392039
3
20402040
);
@@ -2046,7 +2046,7 @@ mod tests {
20462046
db.insert_block(&block_info).unwrap();
20472047

20482048
assert_eq!(
2049-
db.get_globally_signed_block_count_in_tenure(&consensus_hash_1)
2049+
db.get_globally_accepted_block_count_in_tenure(&consensus_hash_1)
20502050
.unwrap(),
20512051
4
20522052
);
@@ -2058,7 +2058,7 @@ mod tests {
20582058
db.insert_block(&block_info).unwrap();
20592059

20602060
assert_eq!(
2061-
db.get_globally_signed_block_count_in_tenure(&consensus_hash_1)
2061+
db.get_globally_accepted_block_count_in_tenure(&consensus_hash_1)
20622062
.unwrap(),
20632063
4
20642064
);

0 commit comments

Comments
 (0)