Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Fix more incorrect merges
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjjzhao committed Apr 20, 2021
1 parent e06be9e commit 4aa0679
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class subjective_billing {

public:
void disable() { _disabled = true; }
bool is_disabled() const { return _disabled; }
void disable_account( chain::account_name a ) { _disabled_accounts.emplace( a ); }

/// @param in_pending_block pass true if pt's bill time is accounted for in the pending block
Expand Down
2 changes: 1 addition & 1 deletion plugins/producer_plugin/producer_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ bool producer_plugin_impl::process_unapplied_trxs( const fc::time_point& deadlin
}

auto prev_billed_cpu_time_us = trx->billed_cpu_time_us;
if(prev_billed_cpu_time_us > 0 && !rl.is_unlimited_cpu( first_auth )) {
if(!_subjective_billing.is_disabled() && prev_billed_cpu_time_us > 0 && !rl.is_unlimited_cpu( first_auth )) {
auto prev_billed_plus100 = prev_billed_cpu_time_us + EOS_PERCENT( prev_billed_cpu_time_us, 100 * config::percent_1 );
auto trx_dl = start + fc::microseconds( prev_billed_plus100 );
if( trx_dl < trx_deadline ) trx_deadline = trx_dl;
Expand Down

0 comments on commit 4aa0679

Please sign in to comment.