Line data Source code
1 : /**
2 : * Copyright Soramitsu Co., Ltd. All Rights Reserved.
3 : * SPDX-License-Identifier: Apache-2.0
4 : */
5 :
6 : #include "interfaces/queries/tx_pagination_meta.hpp"
7 :
8 : #include "cryptography/hash.hpp"
9 :
10 : using namespace shared_model::interface;
11 :
12 : bool TxPaginationMeta::operator==(const ModelType &rhs) const {
13 0 : return pageSize() == rhs.pageSize() and firstTxHash() == rhs.firstTxHash();
14 0 : }
15 :
16 : std::string TxPaginationMeta::toString() const {
17 0 : auto pretty_builder = detail::PrettyStringBuilder()
18 0 : .init("TxPaginationMeta")
19 0 : .append("page_size", std::to_string(pageSize()));
20 0 : auto first_tx_hash = firstTxHash();
21 0 : if (first_tx_hash) {
22 0 : pretty_builder.append("first_tx_hash", first_tx_hash->toString());
23 0 : }
24 0 : return pretty_builder.finalize();
25 0 : }
|