Skip to content

Commit

Permalink
Shaders: nephrite/app: upd_stab fixed charge estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
valdok committed Dec 4, 2023
1 parent a3a60c1 commit 847d23a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bvm/Shaders/nephrite/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ struct AppGlobalPlus
pFc[2].m_Amount = tx.m_GovPull;
pFc[2].m_Aid = m_Settings.m_AidGov;
pFc[2].m_Consume = 0;
AdjustChargeFunds(pFc[2], nCharge);

if (m_Balance.m_Gov && !bUseBank)
{
Expand Down Expand Up @@ -995,7 +996,7 @@ ON_METHOD(user, upd_stab)
Charge::StdCall() +
Env::Cost::LoadVar_For(sizeof(StabPoolEntry)) +
Env::Cost::SaveVar_For(sizeof(StabPoolEntry)) +
Charge::StabPoolOp0 * 2 + // account for reward calculation
Charge::StabPoolOp0 * 3 + // calculate reward, calculate stab, re-enter stab
g.m_EpochStorageStab.m_Charge +
Env::Cost::Cycle * 100;

Expand Down
Binary file modified bvm/Shaders/nephrite/app.wasm
Binary file not shown.

0 comments on commit 847d23a

Please sign in to comment.