fix: fix tx propagation when full (#10251)

This commit is contained in:
Matthias Seitz
2024-08-12 18:28:49 +02:00
committed by GitHub
parent 3fe862eb4f
commit b8a6f87884
3 changed files with 297 additions and 59 deletions

View File

@ -718,7 +718,7 @@ impl PoolTransaction for MockTransaction {
/// Returns the encoded length of the transaction.
fn encoded_length(&self) -> usize {
0
self.size()
}
/// Returns the chain ID associated with the transaction.

View File

@ -499,6 +499,16 @@ impl PropagateKind {
Self::Full(peer) | Self::Hash(peer) => peer,
}
}
/// Returns true if the transaction was sent as a full transaction
pub const fn is_full(&self) -> bool {
matches!(self, Self::Full(_))
}
/// Returns true if the transaction was sent as a hash
pub const fn is_hash(&self) -> bool {
matches!(self, Self::Hash(_))
}
}
impl From<PropagateKind> for PeerId {