Skip to content

Commit ff2c499

Browse files
committed
chore: remove changes related to revoke
1 parent c068795 commit ff2c499

File tree

2 files changed

+8
-56
lines changed

2 files changed

+8
-56
lines changed

pox-locking/src/events.rs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ use stacks_common::{error, test_debug};
3131
/// - for delegate stacking functions, it's the first argument
3232
fn get_stacker(sender: &PrincipalData, function_name: &str, args: &[Value]) -> Value {
3333
match function_name {
34-
"stack-stx"
35-
| "stack-increase"
36-
| "stack-extend"
37-
| "delegate-stx"
38-
| "revoke-delegate-stx" => Value::Principal(sender.clone()),
34+
"stack-stx" | "stack-increase" | "stack-extend" | "delegate-stx" => {
35+
Value::Principal(sender.clone())
36+
}
3937
_ => args[0].clone(),
4038
}
4139
}
@@ -337,20 +335,11 @@ fn create_event_info_data_code(function_name: &str, args: &[Value]) -> String {
337335
pox_addr = &args[3],
338336
)
339337
}
340-
"revoke-delegate-stx" => {
341-
format!(
342-
r#"
343-
{{
344-
data: {{ }}
345-
}}
346-
"#,
347-
)
348-
}
349338
_ => "{{ data: {{ unimplemented: true }} }}".into(),
350339
}
351340
}
352341

353-
/// Synthesize an events data tuple to return on the successful execution of a pox-2 or pox-3 or pox-4 stacking
342+
/// Synthesize an events data tuple to return on the successful execution of a pox-2 or pox-3 stacking
354343
/// function. It runs a series of Clarity queries against the PoX contract's data space (including
355344
/// calling PoX functions).
356345
pub fn synthesize_pox_event_info(
@@ -373,8 +362,7 @@ pub fn synthesize_pox_event_info(
373362
| "delegate-stack-extend"
374363
| "stack-increase"
375364
| "delegate-stack-increase"
376-
| "delegate-stx"
377-
| "revoke-delegate-stx" => Some(create_event_info_stack_or_delegate_code(
365+
| "delegate-stx" => Some(create_event_info_stack_or_delegate_code(
378366
sender,
379367
function_name,
380368
args,

stackslib/src/chainstate/stacks/boot/pox_3_tests.rs

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,12 +1284,6 @@ fn delegate_stack_increase() {
12841284

12851285
let tip = get_tip(peer.sortdb.as_ref());
12861286

1287-
// submit revoke delegation tx
1288-
let alice_revoke_elegation =
1289-
make_pox_3_contract_call(&alice, alice_nonce, "revoke-delegate-stx", vec![]);
1290-
let alice_revoke_delegation_pox_3_nonce = alice_nonce;
1291-
alice_nonce += 1;
1292-
12931287
// submit delegation tx
12941288
let alice_delegation_1 = make_pox_3_contract_call(
12951289
&alice,
@@ -1321,11 +1315,7 @@ fn delegate_stack_increase() {
13211315
bob_nonce += 1;
13221316

13231317
latest_block = peer.tenure_with_txs(
1324-
&[
1325-
alice_revoke_elegation,
1326-
alice_delegation_1,
1327-
delegate_stack_tx,
1328-
],
1318+
&[alice_delegation_1, delegate_stack_tx],
13291319
&mut coinbase_nonce,
13301320
);
13311321

@@ -1501,7 +1491,7 @@ fn delegate_stack_increase() {
15011491
}
15021492
}
15031493

1504-
assert_eq!(alice_txs.len() as u64, 5);
1494+
assert_eq!(alice_txs.len() as u64, 4);
15051495
assert_eq!(bob_txs.len() as u64, 10);
15061496

15071497
// transaction should fail because Alice cannot increase her own stacking amount while delegating
@@ -1557,32 +1547,6 @@ fn delegate_stack_increase() {
15571547
"(err 18)"
15581548
);
15591549

1560-
// check event for revoke delegation tx
1561-
let revoke_delegation_tx_events = &alice_txs
1562-
.get(&alice_revoke_delegation_pox_3_nonce)
1563-
.unwrap()
1564-
.clone()
1565-
.events;
1566-
assert_eq!(revoke_delegation_tx_events.len() as u64, 1);
1567-
let revoke_delegation_tx = &revoke_delegation_tx_events[0];
1568-
let revoke_delegate_stx_op_data = HashMap::from([]);
1569-
let common_data = PoxPrintFields {
1570-
op_name: "revoke-delegate-stx".to_string(),
1571-
stacker: Value::Principal(
1572-
StacksAddress::from_string("ST2Q1B4S2DY2Y96KYNZTVCCZZD1V9AGWCS5MFXM4C")
1573-
.unwrap()
1574-
.to_account_principal(),
1575-
),
1576-
balance: Value::UInt(10240000000000),
1577-
locked: Value::UInt(0),
1578-
burnchain_unlock_height: Value::UInt(0),
1579-
};
1580-
check_pox_print_event(
1581-
revoke_delegation_tx,
1582-
common_data,
1583-
revoke_delegate_stx_op_data,
1584-
);
1585-
15861550
for delegation_nonce in [alice_delegation_pox_2_nonce, alice_delegation_pox_3_nonce] {
15871551
let delegate_stx_tx = &alice_txs.get(&delegation_nonce).unwrap().clone().events[0];
15881552
let delegate_stx_op_data = HashMap::from([
@@ -3142,7 +3106,7 @@ fn pox_3_getters() {
31423106
tip.block_height,
31433107
);
31443108

3145-
// bob delegates to charlie
3109+
// bob deleates to charlie
31463110
let bob_delegate_tx = make_pox_3_contract_call(
31473111
&bob,
31483112
0,

0 commit comments

Comments
 (0)