mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-30 07:48:09 +08:00
chore: add comment to the manual calculation of reward_cycle_id
This commit is contained in:
@@ -286,6 +286,9 @@ impl RPCPoxInfoData {
|
||||
return Err(NetError::DBError(DBError::Corruption));
|
||||
}
|
||||
|
||||
// Manually calculate `reward_cycle_id` so that clients don't get an "off by one" view at
|
||||
// reward cycle boundaries (because if the reward cycle is loaded from clarity, its
|
||||
// evaluated in the last mined Stacks block, not the most recent burn block).
|
||||
let reward_cycle_id = burnchain
|
||||
.block_height_to_reward_cycle(burnchain_tip.block_height)
|
||||
.ok_or_else(|| {
|
||||
|
||||
Reference in New Issue
Block a user