Skip to content

Commit 30816d6

Browse files
committed
CRC: revert deletion of test_get_signer_protocol_version
Signed-off-by: Jacinta Ferrant <jacinta.ferrant@gmail.com>
1 parent cad3dfb commit 30816d6

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

stacks-signer/src/v0/signer.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,15 +1825,7 @@ impl Signer {
18251825

18261826
#[cfg(any(test, feature = "testing"))]
18271827
fn get_signer_protocol_version(&self) -> u64 {
1828-
use crate::v0::tests::TEST_PIN_SUPPORTED_SIGNER_PROTOCOL_VERSION;
1829-
let public_keys = TEST_PIN_SUPPORTED_SIGNER_PROTOCOL_VERSION.get();
1830-
if let Some(version) = public_keys.get(
1831-
&stacks_common::types::chainstate::StacksPublicKey::from_private(&self.private_key),
1832-
) {
1833-
warn!("{self}: signer version is pinned to {version}");
1834-
return *version;
1835-
}
1836-
self.supported_signer_protocol_version
1828+
self.test_get_signer_protocol_version()
18371829
}
18381830
}
18391831

stacks-signer/src/v0/tests.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,16 @@ impl Signer {
157157
warn!("{self}: Block validation submission is no longer stalled due to testing directive. Continuing...");
158158
}
159159
}
160+
161+
/// Get the pinned signer version for the signer
162+
pub fn test_get_signer_protocol_version(&self) -> u64 {
163+
let public_keys = TEST_PIN_SUPPORTED_SIGNER_PROTOCOL_VERSION.get();
164+
if let Some(version) = public_keys.get(
165+
&stacks_common::types::chainstate::StacksPublicKey::from_private(&self.private_key),
166+
) {
167+
warn!("{self}: signer version is pinned to {version}");
168+
return *version;
169+
}
170+
self.supported_signer_protocol_version
171+
}
160172
}

0 commit comments

Comments
 (0)