mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +00:00
Minor gossip changes (#2038)
* core: gossip: don't expire messages based on time * core: gossip: allow forcing resend of gossip messages * core: grandpa: fix tests
This commit is contained in:
committed by
Robert Habermeier
parent
002143d0a2
commit
e56a5cd00b
@@ -193,9 +193,10 @@ impl Network<Block> for MessageRouting {
|
||||
Box::new(messages)
|
||||
}
|
||||
|
||||
fn send_message(&self, round: u64, set_id: u64, message: Vec<u8>) {
|
||||
fn send_message(&self, round: u64, set_id: u64, message: Vec<u8>, force: bool) {
|
||||
let inner = self.inner.lock();
|
||||
inner.peer(self.peer_id).gossip_message(make_topic(round, set_id), GRANDPA_ENGINE_ID, message);
|
||||
inner.peer(self.peer_id)
|
||||
.gossip_message(make_topic(round, set_id), GRANDPA_ENGINE_ID, message, force);
|
||||
}
|
||||
|
||||
fn drop_round_messages(&self, round: u64, set_id: u64) {
|
||||
@@ -214,7 +215,7 @@ impl Network<Block> for MessageRouting {
|
||||
self.validator.note_set(set_id);
|
||||
let inner = self.inner.lock();
|
||||
let peer = inner.peer(self.peer_id);
|
||||
let messages = peer.consensus_gossip_messages_for(
|
||||
let messages = peer.consensus_gossip_messages_for(
|
||||
GRANDPA_ENGINE_ID,
|
||||
make_commit_topic(set_id),
|
||||
);
|
||||
@@ -226,9 +227,10 @@ impl Network<Block> for MessageRouting {
|
||||
Box::new(messages)
|
||||
}
|
||||
|
||||
fn send_commit(&self, _round: u64, set_id: u64, message: Vec<u8>) {
|
||||
fn send_commit(&self, _round: u64, set_id: u64, message: Vec<u8>, force: bool) {
|
||||
let inner = self.inner.lock();
|
||||
inner.peer(self.peer_id).gossip_message(make_commit_topic(set_id), GRANDPA_ENGINE_ID, message);
|
||||
inner.peer(self.peer_id)
|
||||
.gossip_message(make_commit_topic(set_id), GRANDPA_ENGINE_ID, message, force);
|
||||
}
|
||||
|
||||
fn announce(&self, _round: u64, _set_id: u64, _block: H256) {
|
||||
|
||||
Reference in New Issue
Block a user