File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
crates/net/network/src/transactions Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,16 @@ pub enum TransactionPropagationKind {
125125 All ,
126126 /// Propagate transactions to only trusted peers.
127127 Trusted ,
128+ /// Do not propagate transactions
129+ None ,
128130}
129131
130132impl TransactionPropagationPolicy for TransactionPropagationKind {
131133 fn can_propagate < N : NetworkPrimitives > ( & self , peer : & mut PeerMetadata < N > ) -> bool {
132134 match self {
133135 Self :: All => true ,
134136 Self :: Trusted => peer. peer_kind . is_trusted ( ) ,
137+ Self :: None => false ,
135138 }
136139 }
137140
@@ -147,6 +150,7 @@ impl FromStr for TransactionPropagationKind {
147150 match s {
148151 "All" | "all" => Ok ( Self :: All ) ,
149152 "Trusted" | "trusted" => Ok ( Self :: Trusted ) ,
153+ "None" | "none" => Ok ( Self :: None ) ,
150154 _ => Err ( format ! ( "Invalid transaction propagation policy: {s}" ) ) ,
151155 }
152156 }
You can’t perform that action at this time.
0 commit comments