Skip to content

Commit

Permalink
Work after review, renames
Browse files Browse the repository at this point in the history
  • Loading branch information
dominious1 authored and appetrosyan committed Sep 12, 2023
1 parent 8e192e4 commit b7910c2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,26 @@ std::optional<types::HeightType> TxPaginationMeta::lastTxHeight() const {
return types::HeightType(meta_.last_tx_height());
}
//trans_text
std::optional<types::HeightType> TxPaginationMeta::transText() const {
if (meta_.opt_trans_text_case()
== iroha::protocol::TxPaginationMeta::OptTransTextCase::OPT_TRANS_TEXT_NOT_SET) {
std::optional<types::HeightType> TxPaginationMeta::txText() const {
if (meta_.opt_tx_text_case()
== iroha::protocol::TxPaginationMeta::OptTxTextCase::OPT_TX_TEXT_NOT_SET) {
return std::nullopt;
}
return types::HeightType(meta_.trans_text());
return types::HeightType(meta_.tx_text());
}
//trans_account
std::optional<types::HeightType> TxPaginationMeta::transAccount() const {
if (meta_.opt_trans_account_case()
== iroha::protocol::TxPaginationMeta::OptTransAccountCase::OPT_TRANS_ACCOUNT_NOT_SET) {
std::optional<types::HeightType> TxPaginationMeta::txAccount() const {
if (meta_.opt_tx_account_case()
== iroha::protocol::TxPaginationMeta::OptTxAccountCase::OPT_TX_ACCOUNT_NOT_SET) {
return std::nullopt;
}
return types::HeightType(meta_.trans_account());
return types::HeightType(meta_.tx_account());
}
//trans_sent_from_account
std::optional<types::HeightType> TxPaginationMeta::transSentFromAccount() const {
if (meta_.opt_trans_sent_from_account_case()
== iroha::protocol::TxPaginationMeta::OptTransSentFromAccountCase::OPT_TRANS_SENT_FROM_ACCOUNT_NOT_SET) {
std::optional<types::HeightType> TxPaginationMeta::txSentFromAccount() const {
if (meta_.opt_tx_sent_from_account_case()
== iroha::protocol::TxPaginationMeta::OptTxSentFromAccountCase::OPT_TX_SENT_FROM_ACCOUNT_NOT_SET) {
return std::nullopt;
}
return types::HeightType(meta_.trans_sent_from_account());
}
return types::HeightType(meta_.tx_sent_from_account());
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ namespace shared_model {
const override;
std::optional<interface::types::HeightType> lastTxHeight()
const override;
std::optional<interface::types::HeightType> transText() const override;
std::optional<interface::types::HeightType> transAccount() const override;
std::optional<interface::types::HeightType> transSentFromAccount()
std::optional<interface::types::HeightType> txText() const override;
std::optional<interface::types::HeightType> txAccount() const override;
std::optional<interface::types::HeightType> txSentFromAccount()
const override;
private:
const iroha::protocol::TxPaginationMeta &meta_;
Expand Down
6 changes: 3 additions & 3 deletions shared_model/interfaces/queries/tx_pagination_meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ namespace shared_model {
virtual std::optional<types::TimestampType> lastTxTime() const = 0;
virtual std::optional<types::HeightType> firstTxHeight() const = 0;
virtual std::optional<types::HeightType> lastTxHeight() const = 0;
virtual std::optional<types::HeightType> transText() const = 0;
virtual std::optional<types::HeightType> transAccount() const = 0;
virtual std::optional<types::HeightType> transSentFromAccount() const = 0;
virtual std::optional<types::HeightType> txText() const = 0;
virtual std::optional<types::HeightType> txAccount() const = 0;
virtual std::optional<types::HeightType> txSentFromAccount() const = 0;
std::string toString() const override;

bool operator==(const ModelType &rhs) const override;
Expand Down
12 changes: 6 additions & 6 deletions shared_model/schema/queries.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ message TxPaginationMeta {
oneof opt_last_tx_height {
uint64 last_tx_height = 7;
}
oneof opt_trans_text{
uint64 trans_text = 8;
oneof opt_tx_text{
uint64 tx_text = 8;
}
oneof opt_trans_account{
uint64 trans_account = 9;
oneof opt_tx_account{
uint64 tx_account = 9;
}
oneof opt_trans_sent_from_account{
uint64 trans_sent_from_account = 10;
oneof opt_tx_sent_from_account{
uint64 tx_sent_from_account = 10;
}
}

Expand Down

0 comments on commit b7910c2

Please sign in to comment.