From bee6e053fa80efa46077b1030465bdb940700adb Mon Sep 17 00:00:00 2001 From: Huang-Ming Huang Date: Tue, 16 Mar 2021 14:01:09 -0500 Subject: [PATCH] time tracking for kv_get_row --- plugins/chain_plugin/chain_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 9cec1e942fc..7f4d0085ff0 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -2186,9 +2186,10 @@ struct kv_reverse_range { template read_only::get_table_rows_result kv_get_rows(Range&& range) { + keep_processing kp {}; read_only::get_table_rows_result result; auto& ctx = range.current.context; - for (unsigned count = 0; count < ctx.p.limit && !range.is_done(); + for (unsigned count = 0; count < ctx.p.limit && !range.is_done() && kp() ; ++count) { result.rows.emplace_back(range.current.get_value_and_maybe_payer_var()); range.next();