Skip to content

Commit 48442cc

Browse files
committed
updated variable names
1 parent b775a1c commit 48442cc

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

stackslib/src/chainstate/stacks/boot/pox-4.clar

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,11 @@
664664
(err ERR_STACKING_INVALID_POX_ADDRESS))
665665
true)
666666

667-
;; address hashbytes must be valid for the version
668-
(asserts! (check-pox-addr-hashbytes (get version pox-addr) (get hashbytes pox-addr))
667+
(match pox-addr
668+
pox-tuple
669+
(asserts! (check-pox-addr-hashbytes (get version pox-tuple) (get hashbytes pox-tuple))
669670
(err ERR_STACKING_INVALID_POX_ADDRESS))
671+
true)
670672

671673
;; tx-sender must not be delegating
672674
(asserts! (is-none (get-check-delegation tx-sender))
@@ -897,12 +899,12 @@
897899
(let ((partial-amount-ustx (get stacked-amount partial-stacked))
898900
;; reward-cycle must point to an existing record in reward-cycle-total-stacked
899901
;; infallible; getting something from partial-stacked-by-cycle succeeded so this must succeed
900-
(existing-cycle-total (unwrap-panic (map-get? reward-cycle-total-stacked { reward-cycle: reward-cycle })))
902+
(existing-cycle (unwrap-panic (map-get? reward-cycle-total-stacked { reward-cycle: reward-cycle })))
901903
;; reward-cycle and reward-cycle-index must point to an existing record in reward-cycle-pox-address-list
902-
(existing-entry-total (unwrap! (map-get? reward-cycle-pox-address-list { reward-cycle: reward-cycle, index: reward-cycle-index })
904+
(existing-entry (unwrap! (map-get? reward-cycle-pox-address-list { reward-cycle: reward-cycle, index: reward-cycle-index })
903905
(err ERR_DELEGATION_NO_REWARD_SLOT)))
904-
(increased-entry-total (+ (get total-ustx existing-entry-total) partial-amount-ustx))
905-
(increased-cycle-total (+ (get total-ustx existing-cycle-total) partial-amount-ustx)))
906+
(increased-entry-total (+ (get total-ustx existing-entry) partial-amount-ustx))
907+
(increased-cycle-total (+ (get total-ustx existing-cycle) partial-amount-ustx)))
906908

907909
;; must be stackable
908910
(try! (minimal-can-stack-stx pox-addr increased-entry-total reward-cycle u1))

0 commit comments

Comments
 (0)