Skip to content

Commit

Permalink
reward thermostat was not running on epoch boundary. Now it runs and …
Browse files Browse the repository at this point in the history
…is instrumented
  • Loading branch information
0o-de-lally committed Nov 4, 2023
1 parent f7313cf commit e7824ee
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions framework/libra-framework/sources/ol_sources/epoch_boundary.move
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ module diem_framework::epoch_boundary {

infra_subsize_amount: u64, // TODO
infra_subsizize_success: bool, // TODO

pof_thermo_success: bool,
pof_thermo_increase: bool,
pof_thermo_amount: u64,
}

public fun initialize(framework: &signer) {
Expand Down Expand Up @@ -139,6 +143,10 @@ module diem_framework::epoch_boundary {

infra_subsize_amount: 0,
infra_subsizize_success: false,

pof_thermo_success: false,
pof_thermo_increase: false,
pof_thermo_amount: 0,
});
}
}
Expand Down Expand Up @@ -179,6 +187,12 @@ module diem_framework::epoch_boundary {

subsidize_from_infra_escrow(root);

let (t_success, t_increase, t_amount) =
proof_of_fee::reward_thermostat(root);
status.pof_thermo_success = t_success;
status.pof_thermo_increase = t_increase;
status.pof_thermo_amount = t_amount;

// print(borrow_global<BoundaryStatus>(@ol_framework))
}

Expand Down

0 comments on commit e7824ee

Please sign in to comment.