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

Consolidated Security Updates for 2.0.12 - 2.1.x #10273

Merged
merged 3 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix more incorrect merges
  • Loading branch information
nickjjzhao committed Apr 20, 2021
commit 4aa0679eb2fbe96cb92e325c2059c07a72da142f
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