Remove incorrect error on tx status RPC (#1136)

* Pending transactions later than the global tx id are allowed

* tx status is not execute-locally
This commit is contained in:
Eddy Ashton 2020-05-05 13:11:06 +01:00 коммит произвёл GitHub
Родитель 52c8c97fb2
Коммит 6ebdcc6c4e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 1 добавлений и 25 удалений

Просмотреть файл

@ -269,7 +269,6 @@ namespace ccf
.set_execute_locally(true);
install(GeneralProcs::GET_TX_STATUS, json_adapter(get_tx_status), Read)
.set_auto_schema<GetTxStatus>()
.set_execute_locally(true)
.set_http_get_only();
install(GeneralProcs::GET_METRICS, json_adapter(get_metrics), Read)
.set_auto_schema<void, GetMetrics::Out>()

Просмотреть файл

@ -92,19 +92,6 @@ TEST_CASE("edge cases")
{
INFO("Node is in a newer view");
// Impossible: cannot have local progress in a view without an initial
// global point in that view
// get_tx_status(a, b, N, <N, c)
CHECK_THROWS(get_tx_status(3, 10, 2, 1, 8));
CHECK_THROWS(get_tx_status(3, 10, 2, 1, 10));
CHECK_THROWS(get_tx_status(3, 10, 2, 1, 12));
CHECK_THROWS(get_tx_status(3, 10, 3, 2, 8));
CHECK_THROWS(get_tx_status(3, 10, 3, 2, 10));
CHECK_THROWS(get_tx_status(3, 10, 3, 2, 12));
CHECK_THROWS(get_tx_status(3, 10, 4, 3, 8));
CHECK_THROWS(get_tx_status(3, 10, 4, 3, 10));
CHECK_THROWS(get_tx_status(3, 10, 4, 3, 12));
CHECK(get_tx_status(3, 10, 0, 4, 8) == TxStatus::Invalid);
CHECK(get_tx_status(3, 10, 4, 4, 8) == TxStatus::Invalid);
CHECK(get_tx_status(3, 10, 4, 4, 10) == TxStatus::Invalid);

Просмотреть файл

@ -42,16 +42,6 @@ namespace ccf
target_seqno));
}
if (local_view > committed_view)
{
throw std::logic_error(fmt::format(
"Should not believe {} occurred in view {}, ahead of the current "
"committed view {}",
target_view,
local_view,
committed_view));
}
if (is_committed)
{
// The requested seqno has been committed, so we know for certain whether
@ -65,7 +55,7 @@ namespace ccf
return TxStatus::Invalid;
}
}
else if (local_view == target_view)
else if (views_match)
{
// This node knows about the requested tx id, but it is not globally
// committed