@@ -364,7 +364,6 @@ impl TryFrom<ChainHash> for Network {
364364mod tests {
365365 use super :: { Network , TestnetVersion } ;
366366 use crate :: consensus:: encode:: { deserialize, serialize} ;
367- use crate :: p2p:: ServiceFlags ;
368367
369368 #[ test]
370369 fn serialize_deserialize ( ) {
@@ -409,47 +408,6 @@ mod tests {
409408 assert ! ( "fakenet" . parse:: <Network >( ) . is_err( ) ) ;
410409 }
411410
412- #[ test]
413- fn service_flags ( ) {
414- let all = [
415- ServiceFlags :: NETWORK ,
416- ServiceFlags :: GETUTXO ,
417- ServiceFlags :: BLOOM ,
418- ServiceFlags :: WITNESS ,
419- ServiceFlags :: COMPACT_FILTERS ,
420- ServiceFlags :: NETWORK_LIMITED ,
421- ServiceFlags :: P2P_V2 ,
422- ] ;
423-
424- let mut flags = ServiceFlags :: NONE ;
425- for f in all. iter ( ) {
426- assert ! ( !flags. has( * f) ) ;
427- }
428-
429- flags |= ServiceFlags :: WITNESS ;
430- assert_eq ! ( flags, ServiceFlags :: WITNESS ) ;
431-
432- let mut flags2 = flags | ServiceFlags :: GETUTXO ;
433- for f in all. iter ( ) {
434- assert_eq ! ( flags2. has( * f) , * f == ServiceFlags :: WITNESS || * f == ServiceFlags :: GETUTXO ) ;
435- }
436-
437- flags2 ^= ServiceFlags :: WITNESS ;
438- assert_eq ! ( flags2, ServiceFlags :: GETUTXO ) ;
439-
440- flags2 |= ServiceFlags :: COMPACT_FILTERS ;
441- flags2 ^= ServiceFlags :: GETUTXO ;
442- assert_eq ! ( flags2, ServiceFlags :: COMPACT_FILTERS ) ;
443-
444- // Test formatting.
445- assert_eq ! ( "ServiceFlags(NONE)" , ServiceFlags :: NONE . to_string( ) ) ;
446- assert_eq ! ( "ServiceFlags(WITNESS)" , ServiceFlags :: WITNESS . to_string( ) ) ;
447- let flag = ServiceFlags :: WITNESS | ServiceFlags :: BLOOM | ServiceFlags :: NETWORK ;
448- assert_eq ! ( "ServiceFlags(NETWORK|BLOOM|WITNESS)" , flag. to_string( ) ) ;
449- let flag = ServiceFlags :: WITNESS | 0xf0 . into ( ) ;
450- assert_eq ! ( "ServiceFlags(WITNESS|COMPACT_FILTERS|0xb0)" , flag. to_string( ) ) ;
451- }
452-
453411 #[ test]
454412 #[ cfg( feature = "serde" ) ]
455413 fn serde_roundtrip ( ) {
0 commit comments