We have problem with built-in unit-tests when we increase min_activated_stake (producer_pay.cpp):

const int64_t  min_activated_stake   = 300'000'000'0000;

And unit tests agrio_system_tests/multiple_namebids fail with

fatal error: in "agrio_system_tests/multiple_namebids": critical check success() == bidname( "alice", "prefb", core_from_string("1.1001") ) has failed [ != billed CPU time (2000 us) is greater than the maximum billable CPU time for the transaction (1760 us)]

We found that changing value default_max_block_cpu_usage (from config.hpp) from 200'000 to 400'000 solve the problem:

const static uint32_t   default_max_block_cpu_usage = 200'000; /// max block cpu usage in microseconds   

1) I want to understand, is this the right way to solve the problem?

2) And how does this parameter affect the operation of the block producers?

3) How can we provide custom default_max_block_cpu_usage value for unit-tests and keep original value for production environment ?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.