Skip to content

Commit

Permalink
Remove unused IN_PROGRESS transaction status (hyperledger-iroha#1100)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Lebedev <[email protected]>
  • Loading branch information
lebdron authored and x3medima17 committed Mar 30, 2018
1 parent fc189c1 commit 66a9609
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions iroha-cli/interactive/impl/interactive_status_cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ namespace iroha_cli {
"Transaction has successfully passed stateful validation."},
{iroha::protocol::TxStatus::COMMITTED,
"Transaction was successfully committed."},
{iroha::protocol::TxStatus::IN_PROGRESS,
"Transaction is being processed at the moment."},
{iroha::protocol::TxStatus::NOT_RECEIVED,
"Transaction was not found in the system."}};

Expand Down
1 change: 0 additions & 1 deletion irohad/model/transaction_response.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ namespace iroha {
STATEFUL_VALIDATION_FAILED, // stateful validation failed
STATEFUL_VALIDATION_SUCCESS, // stateful validation passed
COMMITTED, // tx pipeline succeeded, tx is committed
IN_PROGRESS, // transaction is received, but not validated
NOT_RECEIVED // transaction is not in handler map
};

Expand Down
3 changes: 1 addition & 2 deletions schema/endpoint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ enum TxStatus {
STATEFUL_VALIDATION_FAILED = 2;
STATEFUL_VALIDATION_SUCCESS = 3;
COMMITTED = 4;
IN_PROGRESS = 5;
NOT_RECEIVED = 6;
NOT_RECEIVED = 5;
}

message ToriiResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ TEST(ProtoTxResponse, TxResponseLoad) {
boost::for_each(boost::irange(0, tx_status_enum->value_count()), [&](auto i) {
response.GetReflection()->SetEnumValue(
&response, tx_status, tx_status_enum->value(i)->number());
// proto::UnknownTxResponse is replacement for
// protocol::ON_PROCESS and protocol::NOT_RECEIVED
// thus last index is lesser by 1 than protobuf's
auto model_response = shared_model::proto::TransactionResponse(response);
ASSERT_EQ(std::min(i, tx_status_enum->value_count() - 2),
model_response.get().which());
ASSERT_EQ(i, model_response.get().which());
ASSERT_EQ(model_response.transactionHash(),
shared_model::crypto::Hash(hash));
});
Expand Down

0 comments on commit 66a9609

Please sign in to comment.