File tree 3 files changed +9
-8
lines changed 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,8 @@ pub struct Args {
178
178
/// peers into its mempool. And if the node is either upgrading transaction
179
179
/// proofs on the network or composing, it will never merge two transactions
180
180
/// that would exceed this limit. Does not affect block validity, i.e.
181
- /// consensus. So a block with more than this number of inputs may be
182
- /// considered value . Also does not affect which block proposals that a
181
+ /// consensus: a block with more than this number of inputs can be
182
+ /// valid . Also does not affect which block proposals that a
183
183
/// guessing node will attempt to solve the PoW puzzle for. Set to "none" to
184
184
/// disable this limit.
185
185
#[ clap( long, value_parser = parse_optional_usize, default_value = "28" ) ]
@@ -630,6 +630,7 @@ mod cli_args_tests {
630
630
#[ test]
631
631
fn test_parse_optional_usize ( ) {
632
632
assert_eq ! ( parse_optional_usize( "42" ) , Ok ( Some ( 42 ) ) ) ;
633
+ assert_eq ! ( parse_optional_usize( "28" ) , Ok ( Some ( 28 ) ) ) ;
633
634
assert_eq ! ( parse_optional_usize( "0" ) , Ok ( Some ( 0 ) ) ) ;
634
635
assert_eq ! ( parse_optional_usize( "none" ) , Ok ( None ) ) ;
635
636
assert_eq ! ( parse_optional_usize( "None" ) , Ok ( None ) ) ;
Original file line number Diff line number Diff line change @@ -806,15 +806,15 @@ impl MainLoopHandler {
806
806
return Ok ( ( ) ) ;
807
807
}
808
808
809
- // Insert into mempool
809
+ // Insert into mempool, if allowed.
810
810
if let Err ( err) = global_state_mut
811
811
. mempool_insert (
812
812
pt2m_transaction. transaction . to_owned ( ) ,
813
813
TransactionOrigin :: Foreign ,
814
814
)
815
815
. await
816
816
{
817
- warn ! ( "{err}" ) ;
817
+ warn ! ( "cannot add transaction into mempool: {err}" ) ;
818
818
return Ok ( ( ) ) ;
819
819
}
820
820
Original file line number Diff line number Diff line change @@ -246,10 +246,10 @@ impl Mempool {
246
246
pub ( crate ) fn most_dense_single_proof_pair (
247
247
& self ,
248
248
) -> Option < ( [ ( & TransactionKernel , & Proof ) ; 2 ] , TransactionOrigin ) > {
249
- /// Loop from `i`th most valuable transaction in the mempool to the
250
- /// least valuable in order to find a pair whose total number of inputs
249
+ /// Loop from `i`th densest transaction in the mempool to the
250
+ /// least dense in order to find a pair whose total number of inputs
251
251
/// does not exceed the maximum value.
252
- fn skip_first_n_transaction (
252
+ fn most_dense_pair_skip_first_n (
253
253
mempool : & Mempool ,
254
254
i : usize ,
255
255
) -> Option < ( [ ( & TransactionKernel , & Proof ) ; 2 ] , TransactionOrigin ) > {
@@ -279,7 +279,7 @@ impl Mempool {
279
279
None
280
280
}
281
281
282
- ( 0 ..self . len ( ) - 1 ) . find_map ( |i| skip_first_n_transaction ( self , i) )
282
+ ( 0 ..self . len ( ) - 1 ) . find_map ( |i| most_dense_pair_skip_first_n ( self , i) )
283
283
}
284
284
285
285
/// check if transaction exists in mempool
You can’t perform that action at this time.
0 commit comments