File tree Expand file tree Collapse file tree 2 files changed +7
-31
lines changed Expand file tree Collapse file tree 2 files changed +7
-31
lines changed Original file line number Diff line number Diff line change @@ -1664,40 +1664,25 @@ pub struct NodeConfig {
1664
1664
pub stacker_dbs : Vec < QualifiedContractIdentifier > ,
1665
1665
}
1666
1666
1667
- #[ derive( Clone , Debug ) ]
1667
+ #[ derive( Clone , Debug , Default ) ]
1668
1668
pub enum CostEstimatorName {
1669
+ #[ default]
1669
1670
NaivePessimistic ,
1670
1671
}
1671
1672
1672
- #[ derive( Clone , Debug ) ]
1673
+ #[ derive( Clone , Debug , Default ) ]
1673
1674
pub enum FeeEstimatorName {
1675
+ #[ default]
1674
1676
ScalarFeeRate ,
1675
1677
FuzzedWeightedMedianFeeRate ,
1676
1678
}
1677
1679
1678
- #[ derive( Clone , Debug ) ]
1680
+ #[ derive( Clone , Debug , Default ) ]
1679
1681
pub enum CostMetricName {
1682
+ #[ default]
1680
1683
ProportionDotProduct ,
1681
1684
}
1682
1685
1683
- impl Default for CostEstimatorName {
1684
- fn default ( ) -> Self {
1685
- CostEstimatorName :: NaivePessimistic
1686
- }
1687
- }
1688
-
1689
- impl Default for FeeEstimatorName {
1690
- fn default ( ) -> Self {
1691
- FeeEstimatorName :: ScalarFeeRate
1692
- }
1693
- }
1694
-
1695
- impl Default for CostMetricName {
1696
- fn default ( ) -> Self {
1697
- CostMetricName :: ProportionDotProduct
1698
- }
1699
- }
1700
-
1701
1686
impl CostEstimatorName {
1702
1687
fn panic_parse ( s : String ) -> CostEstimatorName {
1703
1688
if & s. to_lowercase ( ) == "naive_pessimistic" {
Original file line number Diff line number Diff line change @@ -52,21 +52,12 @@ use crate::net::{
52
52
use crate :: util_lib:: db:: { DBConn , Error as db_error} ;
53
53
54
54
// did we or did we not successfully send a message?
55
- #[ derive( Debug , Clone ) ]
55
+ #[ derive( Debug , Clone , Default ) ]
56
56
pub struct NeighborHealthPoint {
57
57
pub success : bool ,
58
58
pub time : u64 ,
59
59
}
60
60
61
- impl Default for NeighborHealthPoint {
62
- fn default ( ) -> NeighborHealthPoint {
63
- NeighborHealthPoint {
64
- success : false ,
65
- time : 0 ,
66
- }
67
- }
68
- }
69
-
70
61
pub const NUM_HEALTH_POINTS : usize = 32 ;
71
62
pub const HEALTH_POINT_LIFETIME : u64 = 12 * 3600 ; // 12 hours
72
63
You can’t perform that action at this time.
0 commit comments