-
Notifications
You must be signed in to change notification settings - Fork 15
Update to peer_keys_db_t to match changes in eos-system-contracts pr 185 #1316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ntegration tests. In that case the return value is an empty vector.
libraries/chain/controller.cpp
Outdated
const auto& gpo = db.get<global_property_object>(); | ||
|
||
auto trace = push_transaction(metadata, fc::time_point::maximum(), fc::microseconds::maximum(), | ||
gpo.configuration.min_transaction_cpu_usage, true, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use gpo.configuration.min_transaction_cpu_usage
for read-only, use 0
for billed_cpu_time_us
. explicit_billed_cpu_time
should be false
not true
. I think max_transaction_time
can probably be left as maximum although we might consider using a smaller value. For block_deadline
, if you are going to call this from producer_plugin
then I think you should go ahead and use the actual block_deadline
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arhag any opinion on if we should set a limit on the read-only trx? Maybe something like 10ms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
trx.actions.emplace_back(std::move(act)); | ||
trx.set_reference_block(chain_head.id()); | ||
set_trx_expiration(trx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we require tapos & expiration on read only trx? You might be able to skip these couple lines
Either way, set_trx_expiration()
does a set_reference_block()
anyways so seems at least that line is redundant
using getpeerkeys_res_t = std::vector<peerkeys_t>; | ||
|
||
struct peer_info_t { | ||
uint32_t rank; // rank by `total_votes` of all producers, active or not, may not match schedule rank |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe consider default initializing this to something
Resolves #1183.
Updates for changes in VaultaFoundation/system-contracts#185.