Skip to content

Commit

Permalink
Add handshake to tx protocol (#1460)
Browse files Browse the repository at this point in the history
 * Kagome now writes roles to tx propagation protocol handshake
  • Loading branch information
Harrm authored Jan 10, 2023
1 parent 6ea24a6 commit bfc6a68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace kagome::network {
kPropagateTransactionsProtocol, genesis_hash, chain_spec),
log::createLogger(kPropagateTransactionsProtocolName,
"propagate_transactions_protocol")),
app_config_{app_config},
babe_(std::move(babe)),
extrinsic_observer_(std::move(extrinsic_observer)),
stream_engine_(std::move(stream_engine)),
Expand Down Expand Up @@ -232,7 +233,7 @@ namespace kagome::network {
std::function<void(outcome::result<void>)> &&cb) {
auto read_writer = std::make_shared<ScaleMessageReadWriter>(stream);

read_writer->write(NoData{},
read_writer->write(app_config_.roles(),
[stream = std::move(stream),
direction,
wp = weak_from_this(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ namespace kagome::network {
const static inline auto kPropagateTransactionsProtocolName =
"PropagateTransactionsProtocol"s;
ProtocolBaseImpl base_;
const application::AppConfiguration &app_config_;
std::shared_ptr<consensus::babe::Babe> babe_;
std::shared_ptr<ExtrinsicObserver> extrinsic_observer_;
std::shared_ptr<StreamEngine> stream_engine_;
Expand Down

0 comments on commit bfc6a68

Please sign in to comment.