Skip to content

Commit 03d17e7

Browse files
committed
fix: a lot of stuff
Signed-off-by: Rob Walworth <robert.walworth@swirldslabs.com>
1 parent 2dd6509 commit 03d17e7

24 files changed

+119
-157
lines changed

src/sdk/main/include/BlockNodeServiceEndpoint.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ class BlockNodeServiceEndpoint : public RegisteredServiceEndpoint
2727
* @param proto The RegisteredServiceEndpoint protobuf object from which to construct.
2828
* @return The constructed BlockNodeServiceEndpoint.
2929
*/
30-
[[nodiscard]] static BlockNodeServiceEndpoint
31-
fromProtobuf(const com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint& proto);
30+
[[nodiscard]] static BlockNodeServiceEndpoint fromProtobuf(
31+
const com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint& proto);
3232

3333
/**
3434
* Construct a RegisteredServiceEndpoint protobuf object from this BlockNodeServiceEndpoint.
3535
*
3636
* @return A unique_ptr to the constructed RegisteredServiceEndpoint protobuf object.
3737
*/
38-
[[nodiscard]] std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint>
39-
toProtobuf() const override;
38+
[[nodiscard]] std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint> toProtobuf()
39+
const override;
4040

4141
/**
4242
* Construct a string representation of this BlockNodeServiceEndpoint.

src/sdk/main/include/MirrorNodeServiceEndpoint.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ class MirrorNodeServiceEndpoint : public RegisteredServiceEndpoint
2727
* @param proto The RegisteredServiceEndpoint protobuf object from which to construct.
2828
* @return The constructed MirrorNodeServiceEndpoint.
2929
*/
30-
[[nodiscard]] static MirrorNodeServiceEndpoint
31-
fromProtobuf(const com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint& proto);
30+
[[nodiscard]] static MirrorNodeServiceEndpoint fromProtobuf(
31+
const com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint& proto);
3232

3333
/**
3434
* Construct a RegisteredServiceEndpoint protobuf object from this MirrorNodeServiceEndpoint.
3535
*
3636
* @return A unique_ptr to the constructed RegisteredServiceEndpoint protobuf object.
3737
*/
38-
[[nodiscard]] std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint>
39-
toProtobuf() const override;
38+
[[nodiscard]] std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint> toProtobuf()
39+
const override;
4040

4141
/**
4242
* Construct a string representation of this MirrorNodeServiceEndpoint.

src/sdk/main/include/RegisteredNodeCreateTransaction.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ namespace com::hedera::hapi::node::addressbook
2020
class RegisteredNodeCreateTransactionBody;
2121
}
2222

23-
namespace aproto = com::hedera::hapi::node::addressbook;
24-
2523
namespace Hiero
2624
{
2725
class Key;
@@ -133,11 +131,9 @@ class RegisteredNodeCreateTransaction : public Transaction<RegisteredNodeCreateT
133131

134132
/**
135133
* Derived from Transaction. Verify that all the checksums in this RegisteredNodeCreateTransaction are valid.
136-
*
137-
* @param client The Client that should be used to validate the checksums.
138-
* @throws BadEntityException This RegisteredNodeCreateTransaction's checksums are not valid.
134+
* This transaction has no entity IDs to validate.
139135
*/
140-
void validateChecksums(const Client& client) const override;
136+
void validateChecksums(const Client& /*client*/) const override{};
141137

142138
/**
143139
* Derived from Transaction. Build and add the RegisteredNodeCreateTransaction protobuf representation to the
@@ -158,7 +154,7 @@ class RegisteredNodeCreateTransaction : public Transaction<RegisteredNodeCreateT
158154
* @return A pointer to a RegisteredNodeCreateTransactionBody protobuf object filled with this
159155
* RegisteredNodeCreateTransaction object's data.
160156
*/
161-
[[nodiscard]] aproto::RegisteredNodeCreateTransactionBody* build() const;
157+
[[nodiscard]] com::hedera::hapi::node::addressbook::RegisteredNodeCreateTransactionBody* build() const;
162158

163159
/**
164160
* The administrative key controlled by the node operator.

src/sdk/main/include/RegisteredNodeDeleteTransaction.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ namespace com::hedera::hapi::node::addressbook
1616
class RegisteredNodeDeleteTransactionBody;
1717
}
1818

19-
namespace aproto = com::hedera::hapi::node::addressbook;
20-
2119
namespace Hiero
2220
{
2321
/**
@@ -84,11 +82,9 @@ class RegisteredNodeDeleteTransaction : public Transaction<RegisteredNodeDeleteT
8482

8583
/**
8684
* Derived from Transaction. Verify that all the checksums in this RegisteredNodeDeleteTransaction are valid.
87-
*
88-
* @param client The Client that should be used to validate the checksums.
89-
* @throws BadEntityException This RegisteredNodeDeleteTransaction's checksums are not valid.
85+
* This transaction has no entity IDs to validate.
9086
*/
91-
void validateChecksums(const Client& client) const override;
87+
void validateChecksums(const Client& /*client*/) const override{};
9288

9389
/**
9490
* Derived from Transaction. Build and add the RegisteredNodeDeleteTransaction protobuf representation to the
@@ -109,7 +105,7 @@ class RegisteredNodeDeleteTransaction : public Transaction<RegisteredNodeDeleteT
109105
* @return A pointer to a RegisteredNodeDeleteTransactionBody protobuf object filled with this
110106
* RegisteredNodeDeleteTransaction object's data.
111107
*/
112-
[[nodiscard]] aproto::RegisteredNodeDeleteTransactionBody* build() const;
108+
[[nodiscard]] com::hedera::hapi::node::addressbook::RegisteredNodeDeleteTransactionBody* build() const;
113109

114110
/**
115111
* The identifier of the registered node to delete.

src/sdk/main/include/RegisteredNodeUpdateTransaction.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ namespace com::hedera::hapi::node::addressbook
2222
class RegisteredNodeUpdateTransactionBody;
2323
}
2424

25-
namespace aproto = com::hedera::hapi::node::addressbook;
26-
2725
namespace Hiero
2826
{
2927
class Key;
@@ -161,11 +159,9 @@ class RegisteredNodeUpdateTransaction : public Transaction<RegisteredNodeUpdateT
161159

162160
/**
163161
* Derived from Transaction. Verify that all the checksums in this RegisteredNodeUpdateTransaction are valid.
164-
*
165-
* @param client The Client that should be used to validate the checksums.
166-
* @throws BadEntityException This RegisteredNodeUpdateTransaction's checksums are not valid.
162+
* This transaction has no entity IDs to validate.
167163
*/
168-
void validateChecksums(const Client& client) const override;
164+
void validateChecksums(const Client& /*client*/) const override{};
169165

170166
/**
171167
* Derived from Transaction. Build and add the RegisteredNodeUpdateTransaction protobuf representation to the
@@ -186,7 +182,7 @@ class RegisteredNodeUpdateTransaction : public Transaction<RegisteredNodeUpdateT
186182
* @return A pointer to a RegisteredNodeUpdateTransactionBody protobuf object filled with this
187183
* RegisteredNodeUpdateTransaction object's data.
188184
*/
189-
[[nodiscard]] aproto::RegisteredNodeUpdateTransactionBody* build() const;
185+
[[nodiscard]] com::hedera::hapi::node::addressbook::RegisteredNodeUpdateTransactionBody* build() const;
190186

191187
/**
192188
* The identifier of the registered node to update.

src/sdk/main/include/RegisteredServiceEndpoint.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ class RegisteredServiceEndpoint
3636
* @return A unique_ptr to the constructed RegisteredServiceEndpoint subtype.
3737
* @throws std::invalid_argument If the endpoint_type oneof is not set.
3838
*/
39-
[[nodiscard]] static std::unique_ptr<RegisteredServiceEndpoint>
40-
fromProtobuf(const com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint& proto);
39+
[[nodiscard]] static std::unique_ptr<RegisteredServiceEndpoint> fromProtobuf(
40+
const com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint& proto);
4141

4242
/**
4343
* Construct a RegisteredServiceEndpoint protobuf object from this RegisteredServiceEndpoint object.
4444
*
4545
* @return A unique_ptr to the constructed RegisteredServiceEndpoint protobuf object.
4646
*/
47-
[[nodiscard]] virtual std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint>
48-
toProtobuf() const = 0;
47+
[[nodiscard]] virtual std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint> toProtobuf()
48+
const = 0;
4949

5050
/**
5151
* Construct a string representation of this RegisteredServiceEndpoint object.

src/sdk/main/include/RpcRelayServiceEndpoint.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ class RpcRelayServiceEndpoint : public RegisteredServiceEndpoint
2626
* @param proto The RegisteredServiceEndpoint protobuf object from which to construct.
2727
* @return The constructed RpcRelayServiceEndpoint.
2828
*/
29-
[[nodiscard]] static RpcRelayServiceEndpoint
30-
fromProtobuf(const com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint& proto);
29+
[[nodiscard]] static RpcRelayServiceEndpoint fromProtobuf(
30+
const com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint& proto);
3131

3232
/**
3333
* Construct a RegisteredServiceEndpoint protobuf object from this RpcRelayServiceEndpoint.
3434
*
3535
* @return A unique_ptr to the constructed RegisteredServiceEndpoint protobuf object.
3636
*/
37-
[[nodiscard]] std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint>
38-
toProtobuf() const override;
37+
[[nodiscard]] std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint> toProtobuf()
38+
const override;
3939

4040
/**
4141
* Construct a string representation of this RpcRelayServiceEndpoint.

src/sdk/main/src/BlockNodeApi.cc

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,31 @@ using ProtoApi = com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint
1010

1111
//-----
1212
const std::unordered_map<ProtoApi, BlockNodeApi> gProtobufBlockNodeApiToBlockNodeApi = {
13-
{ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_OTHER, BlockNodeApi::OTHER },
14-
{ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_STATUS, BlockNodeApi::STATUS },
15-
{ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_PUBLISH, BlockNodeApi::PUBLISH },
16-
{ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_SUBSCRIBE_STREAM, BlockNodeApi::SUBSCRIBE_STREAM},
17-
{ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_STATE_PROOF, BlockNodeApi::STATE_PROOF },
13+
{ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_OTHER, BlockNodeApi::OTHER },
14+
{ ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_STATUS, BlockNodeApi::STATUS },
15+
{ ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_PUBLISH, BlockNodeApi::PUBLISH },
16+
{ ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_SUBSCRIBE_STREAM,
17+
BlockNodeApi::SUBSCRIBE_STREAM },
18+
{ ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_STATE_PROOF, BlockNodeApi::STATE_PROOF},
1819
};
1920

2021
//-----
2122
const std::unordered_map<BlockNodeApi, ProtoApi> gBlockNodeApiToProtobufBlockNodeApi = {
22-
{BlockNodeApi::OTHER, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_OTHER },
23-
{BlockNodeApi::STATUS, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_STATUS },
24-
{BlockNodeApi::PUBLISH, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_PUBLISH },
25-
{BlockNodeApi::SUBSCRIBE_STREAM, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_SUBSCRIBE_STREAM},
26-
{BlockNodeApi::STATE_PROOF, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_STATE_PROOF },
23+
{BlockNodeApi::OTHER, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_OTHER },
24+
{ BlockNodeApi::STATUS, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_STATUS },
25+
{ BlockNodeApi::PUBLISH, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_PUBLISH },
26+
{ BlockNodeApi::SUBSCRIBE_STREAM,
27+
ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_SUBSCRIBE_STREAM },
28+
{ BlockNodeApi::STATE_PROOF, ProtoApi::RegisteredServiceEndpoint_BlockNodeEndpoint_BlockNodeApi_STATE_PROOF},
2729
};
2830

2931
//-----
3032
const std::unordered_map<BlockNodeApi, const char*> gBlockNodeApiToString = {
31-
{BlockNodeApi::OTHER, "OTHER" },
32-
{BlockNodeApi::STATUS, "STATUS" },
33-
{BlockNodeApi::PUBLISH, "PUBLISH" },
34-
{BlockNodeApi::SUBSCRIBE_STREAM, "SUBSCRIBE_STREAM"},
35-
{BlockNodeApi::STATE_PROOF, "STATE_PROOF" },
33+
{BlockNodeApi::OTHER, "OTHER" },
34+
{ BlockNodeApi::STATUS, "STATUS" },
35+
{ BlockNodeApi::PUBLISH, "PUBLISH" },
36+
{ BlockNodeApi::SUBSCRIBE_STREAM, "SUBSCRIBE_STREAM"},
37+
{ BlockNodeApi::STATE_PROOF, "STATE_PROOF" },
3638
};
3739

3840
} // namespace Hiero

src/sdk/main/src/BlockNodeServiceEndpoint.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ BlockNodeServiceEndpoint BlockNodeServiceEndpoint::fromProtobuf(
2020
}
2121

2222
//-----
23-
std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint>
24-
BlockNodeServiceEndpoint::toProtobuf() const
23+
std::unique_ptr<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint> BlockNodeServiceEndpoint::toProtobuf()
24+
const
2525
{
2626
auto proto = std::make_unique<com::hedera::hapi::node::addressbook::RegisteredServiceEndpoint>();
2727
fillCommonFields(*proto);

src/sdk/main/src/Executable.cc

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,18 @@ template class Executable<NodeCreateTransaction, proto::Transaction, proto::Tran
665665
template class Executable<NodeDeleteTransaction, proto::Transaction, proto::TransactionResponse, TransactionResponse>;
666666
template class Executable<NodeUpdateTransaction, proto::Transaction, proto::TransactionResponse, TransactionResponse>;
667667
template class Executable<PrngTransaction, proto::Transaction, proto::TransactionResponse, TransactionResponse>;
668-
template class Executable<RegisteredNodeCreateTransaction, proto::Transaction, proto::TransactionResponse, TransactionResponse>;
669-
template class Executable<RegisteredNodeDeleteTransaction, proto::Transaction, proto::TransactionResponse, TransactionResponse>;
670-
template class Executable<RegisteredNodeUpdateTransaction, proto::Transaction, proto::TransactionResponse, TransactionResponse>;
668+
template class Executable<RegisteredNodeCreateTransaction,
669+
proto::Transaction,
670+
proto::TransactionResponse,
671+
TransactionResponse>;
672+
template class Executable<RegisteredNodeDeleteTransaction,
673+
proto::Transaction,
674+
proto::TransactionResponse,
675+
TransactionResponse>;
676+
template class Executable<RegisteredNodeUpdateTransaction,
677+
proto::Transaction,
678+
proto::TransactionResponse,
679+
TransactionResponse>;
671680
template class Executable<ScheduleCreateTransaction,
672681
proto::Transaction,
673682
proto::TransactionResponse,

0 commit comments

Comments
 (0)