@@ -96,25 +96,25 @@ pub const REWARD_WINDOW_END: u64 = 144 * 90 + REWARD_WINDOW_START;
96
96
pub type BlockHeaderCache = HashMap < ConsensusHash , ( Option < BlockHeaderHash > , ConsensusHash ) > ;
97
97
98
98
impl FromRow < SortitionId > for SortitionId {
99
- fn from_row < ' a > ( row : & ' a Row ) -> Result < SortitionId , db_error > {
99
+ fn from_row ( row : & Row ) -> Result < SortitionId , db_error > {
100
100
SortitionId :: from_column ( row, "sortition_id" )
101
101
}
102
102
}
103
103
104
104
impl FromRow < ConsensusHash > for ConsensusHash {
105
- fn from_row < ' a > ( row : & ' a Row ) -> Result < ConsensusHash , db_error > {
105
+ fn from_row ( row : & Row ) -> Result < ConsensusHash , db_error > {
106
106
ConsensusHash :: from_column ( row, "consensus_hash" )
107
107
}
108
108
}
109
109
110
110
impl FromRow < BurnchainHeaderHash > for BurnchainHeaderHash {
111
- fn from_row < ' a > ( row : & ' a Row ) -> Result < BurnchainHeaderHash , db_error > {
111
+ fn from_row ( row : & Row ) -> Result < BurnchainHeaderHash , db_error > {
112
112
BurnchainHeaderHash :: from_column ( row, "burn_header_hash" )
113
113
}
114
114
}
115
115
116
116
impl FromRow < MissedBlockCommit > for MissedBlockCommit {
117
- fn from_row < ' a > ( row : & ' a Row ) -> Result < MissedBlockCommit , db_error > {
117
+ fn from_row ( row : & Row ) -> Result < MissedBlockCommit , db_error > {
118
118
let intended_sortition = SortitionId :: from_column ( row, "intended_sortition_id" ) ?;
119
119
let input_json: String = row. get_unwrap ( "input" ) ;
120
120
let input =
@@ -130,7 +130,7 @@ impl FromRow<MissedBlockCommit> for MissedBlockCommit {
130
130
}
131
131
132
132
impl FromRow < BlockSnapshot > for BlockSnapshot {
133
- fn from_row < ' a > ( row : & ' a Row ) -> Result < BlockSnapshot , db_error > {
133
+ fn from_row ( row : & Row ) -> Result < BlockSnapshot , db_error > {
134
134
let block_height = u64:: from_column ( row, "block_height" ) ?;
135
135
let burn_header_hash = BurnchainHeaderHash :: from_column ( row, "burn_header_hash" ) ?;
136
136
let burn_header_timestamp = u64:: from_column ( row, "burn_header_timestamp" ) ?;
@@ -211,7 +211,7 @@ impl FromRow<BlockSnapshot> for BlockSnapshot {
211
211
}
212
212
213
213
impl FromRow < LeaderKeyRegisterOp > for LeaderKeyRegisterOp {
214
- fn from_row < ' a > ( row : & ' a Row ) -> Result < LeaderKeyRegisterOp , db_error > {
214
+ fn from_row ( row : & Row ) -> Result < LeaderKeyRegisterOp , db_error > {
215
215
let txid = Txid :: from_column ( row, "txid" ) ?;
216
216
let vtxindex: u32 = row. get_unwrap ( "vtxindex" ) ;
217
217
let block_height = u64:: from_column ( row, "block_height" ) ?;
@@ -240,7 +240,7 @@ impl FromRow<LeaderKeyRegisterOp> for LeaderKeyRegisterOp {
240
240
}
241
241
242
242
impl FromRow < LeaderBlockCommitOp > for LeaderBlockCommitOp {
243
- fn from_row < ' a > ( row : & ' a Row ) -> Result < LeaderBlockCommitOp , db_error > {
243
+ fn from_row ( row : & Row ) -> Result < LeaderBlockCommitOp , db_error > {
244
244
let txid = Txid :: from_column ( row, "txid" ) ?;
245
245
let vtxindex: u32 = row. get_unwrap ( "vtxindex" ) ;
246
246
let block_height = u64:: from_column ( row, "block_height" ) ?;
@@ -314,7 +314,7 @@ impl FromRow<LeaderBlockCommitOp> for LeaderBlockCommitOp {
314
314
}
315
315
316
316
impl FromRow < StackStxOp > for StackStxOp {
317
- fn from_row < ' a > ( row : & ' a Row ) -> Result < StackStxOp , db_error > {
317
+ fn from_row ( row : & Row ) -> Result < StackStxOp , db_error > {
318
318
let txid = Txid :: from_column ( row, "txid" ) ?;
319
319
let vtxindex: u32 = row. get_unwrap ( "vtxindex" ) ;
320
320
let block_height = u64:: from_column ( row, "block_height" ) ?;
@@ -357,7 +357,7 @@ impl FromRow<StackStxOp> for StackStxOp {
357
357
}
358
358
359
359
impl FromRow < DelegateStxOp > for DelegateStxOp {
360
- fn from_row < ' a > ( row : & ' a Row ) -> Result < DelegateStxOp , db_error > {
360
+ fn from_row ( row : & Row ) -> Result < DelegateStxOp , db_error > {
361
361
let txid = Txid :: from_column ( row, "txid" ) ?;
362
362
let vtxindex: u32 = row. get_unwrap ( "vtxindex" ) ;
363
363
let block_height = u64:: from_column ( row, "block_height" ) ?;
@@ -389,7 +389,7 @@ impl FromRow<DelegateStxOp> for DelegateStxOp {
389
389
}
390
390
391
391
impl FromRow < TransferStxOp > for TransferStxOp {
392
- fn from_row < ' a > ( row : & ' a Row ) -> Result < TransferStxOp , db_error > {
392
+ fn from_row ( row : & Row ) -> Result < TransferStxOp , db_error > {
393
393
let txid = Txid :: from_column ( row, "txid" ) ?;
394
394
let vtxindex: u32 = row. get_unwrap ( "vtxindex" ) ;
395
395
let block_height = u64:: from_column ( row, "block_height" ) ?;
@@ -417,7 +417,7 @@ impl FromRow<TransferStxOp> for TransferStxOp {
417
417
}
418
418
419
419
impl FromRow < VoteForAggregateKeyOp > for VoteForAggregateKeyOp {
420
- fn from_row < ' a > ( row : & ' a Row ) -> Result < VoteForAggregateKeyOp , db_error > {
420
+ fn from_row ( row : & Row ) -> Result < VoteForAggregateKeyOp , db_error > {
421
421
let txid = Txid :: from_column ( row, "txid" ) ?;
422
422
let vtxindex: u32 = row. get_unwrap ( "vtxindex" ) ;
423
423
let block_height = u64:: from_column ( row, "block_height" ) ?;
@@ -450,15 +450,15 @@ impl FromRow<VoteForAggregateKeyOp> for VoteForAggregateKeyOp {
450
450
}
451
451
452
452
impl FromColumn < ASTRules > for ASTRules {
453
- fn from_column < ' a > ( row : & ' a Row , column_name : & str ) -> Result < ASTRules , db_error > {
453
+ fn from_column ( row : & Row , column_name : & str ) -> Result < ASTRules , db_error > {
454
454
let x: u8 = row. get_unwrap ( column_name) ;
455
455
let ast_rules = ASTRules :: from_u8 ( x) . ok_or ( db_error:: ParseError ) ?;
456
456
Ok ( ast_rules)
457
457
}
458
458
}
459
459
460
460
impl FromRow < ( ASTRules , u64 ) > for ( ASTRules , u64 ) {
461
- fn from_row < ' a > ( row : & ' a Row ) -> Result < ( ASTRules , u64 ) , db_error > {
461
+ fn from_row ( row : & Row ) -> Result < ( ASTRules , u64 ) , db_error > {
462
462
let ast_rules = ASTRules :: from_column ( row, "ast_rule_id" ) ?;
463
463
let height = u64:: from_column ( row, "block_height" ) ?;
464
464
Ok ( ( ast_rules, height) )
@@ -479,7 +479,7 @@ pub struct InitialMiningBonus {
479
479
}
480
480
481
481
impl FromRow < AcceptedStacksBlockHeader > for AcceptedStacksBlockHeader {
482
- fn from_row < ' a > ( row : & ' a Row ) -> Result < AcceptedStacksBlockHeader , db_error > {
482
+ fn from_row ( row : & Row ) -> Result < AcceptedStacksBlockHeader , db_error > {
483
483
let tip_consensus_hash = ConsensusHash :: from_column ( row, "tip_consensus_hash" ) ?;
484
484
let consensus_hash = ConsensusHash :: from_column ( row, "consensus_hash" ) ?;
485
485
let block_hash = BlockHeaderHash :: from_column ( row, "stacks_block_hash" ) ?;
@@ -495,7 +495,7 @@ impl FromRow<AcceptedStacksBlockHeader> for AcceptedStacksBlockHeader {
495
495
}
496
496
497
497
impl FromRow < StacksEpoch > for StacksEpoch {
498
- fn from_row < ' a > ( row : & ' a Row ) -> Result < StacksEpoch , db_error > {
498
+ fn from_row ( row : & Row ) -> Result < StacksEpoch , db_error > {
499
499
let epoch_id_u32: u32 = row. get_unwrap ( "epoch_id" ) ;
500
500
let epoch_id = StacksEpochId :: try_from ( epoch_id_u32) . map_err ( |_| db_error:: ParseError ) ?;
501
501
@@ -1533,7 +1533,7 @@ impl SortitionHandle for SortitionHandleConn<'_> {
1533
1533
}
1534
1534
}
1535
1535
1536
- impl < ' a > SortitionHandleTx < ' a > {
1536
+ impl SortitionHandleTx < ' _ > {
1537
1537
pub fn set_stacks_block_accepted (
1538
1538
& mut self ,
1539
1539
consensus_hash : & ConsensusHash ,
@@ -2646,7 +2646,7 @@ impl<'a> SortitionHandleConn<'a> {
2646
2646
// Connection methods
2647
2647
impl SortitionDB {
2648
2648
/// Begin a transaction.
2649
- pub fn tx_begin < ' a > ( & ' a mut self ) -> Result < SortitionDBTx < ' a > , db_error > {
2649
+ pub fn tx_begin ( & mut self ) -> Result < SortitionDBTx < ' _ > , db_error > {
2650
2650
if !self . readwrite {
2651
2651
return Err ( db_error:: ReadOnly ) ;
2652
2652
}
@@ -2663,7 +2663,7 @@ impl SortitionDB {
2663
2663
}
2664
2664
2665
2665
/// Make an indexed connection
2666
- pub fn index_conn < ' a > ( & ' a self ) -> SortitionDBConn < ' a > {
2666
+ pub fn index_conn ( & self ) -> SortitionDBConn < ' _ > {
2667
2667
SortitionDBConn :: new (
2668
2668
& self . marf ,
2669
2669
SortitionDBTxContext {
@@ -2739,7 +2739,7 @@ impl SortitionDB {
2739
2739
) )
2740
2740
}
2741
2741
2742
- pub fn conn < ' a > ( & ' a self ) -> & ' a Connection {
2742
+ pub fn conn ( & self ) -> & Connection {
2743
2743
self . marf . sqlite_conn ( )
2744
2744
}
2745
2745
@@ -3556,8 +3556,8 @@ impl SortitionDB {
3556
3556
}
3557
3557
3558
3558
#[ cfg( any( test, feature = "testing" ) ) ]
3559
- pub fn override_ast_rule_height < ' a > (
3560
- tx : & mut DBTx < ' a > ,
3559
+ pub fn override_ast_rule_height (
3560
+ tx : & mut DBTx < ' _ > ,
3561
3561
ast_rules : ASTRules ,
3562
3562
height : u64 ,
3563
3563
) -> Result < ( ) , db_error > {
@@ -3699,7 +3699,7 @@ impl SortitionDB {
3699
3699
}
3700
3700
}
3701
3701
3702
- impl < ' a > SortitionDBTx < ' a > {
3702
+ impl SortitionDBTx < ' _ > {
3703
3703
pub fn find_sortition_tip_affirmation_map (
3704
3704
& mut self ,
3705
3705
chain_tip : & SortitionId ,
@@ -3720,7 +3720,7 @@ impl<'a> SortitionDBTx<'a> {
3720
3720
}
3721
3721
}
3722
3722
3723
- impl < ' a > SortitionDBConn < ' a > {
3723
+ impl SortitionDBConn < ' _ > {
3724
3724
pub fn as_handle < ' b > ( & ' b self , chain_tip : & SortitionId ) -> SortitionHandleConn < ' b > {
3725
3725
SortitionHandleConn {
3726
3726
index : self . index ,
@@ -4719,7 +4719,7 @@ impl SortitionDB {
4719
4719
}
4720
4720
4721
4721
/// DO NOT CALL during Stacks block processing (including during Clarity VM evaluation). This function returns the latest data known to the node, which may not have been at the time of original block assembly.
4722
- pub fn index_handle_at_tip < ' a > ( & ' a self ) -> SortitionHandleConn < ' a > {
4722
+ pub fn index_handle_at_tip ( & self ) -> SortitionHandleConn < ' _ > {
4723
4723
let sortition_id = SortitionDB :: get_canonical_sortition_tip ( self . conn ( ) ) . unwrap ( ) ;
4724
4724
self . index_handle ( & sortition_id)
4725
4725
}
@@ -4737,7 +4737,7 @@ impl SortitionDB {
4737
4737
4738
4738
/// Open a tx handle at the burn chain tip
4739
4739
/// DO NOT CALL during Stacks block processing (including during Clarity VM evaluation). This function returns the latest data known to the node, which may not have been at the time of original block assembly.
4740
- pub fn tx_begin_at_tip < ' a > ( & ' a mut self ) -> SortitionHandleTx < ' a > {
4740
+ pub fn tx_begin_at_tip ( & mut self ) -> SortitionHandleTx < ' _ > {
4741
4741
let sortition_id = SortitionDB :: get_canonical_sortition_tip ( self . conn ( ) ) . unwrap ( ) ;
4742
4742
self . tx_handle_begin ( & sortition_id) . unwrap ( )
4743
4743
}
@@ -5394,7 +5394,7 @@ impl SortitionDB {
5394
5394
}
5395
5395
}
5396
5396
5397
- impl < ' a > SortitionHandleTx < ' a > {
5397
+ impl SortitionHandleTx < ' _ > {
5398
5398
/// Append a snapshot to a chain tip, and update various chain tip statistics.
5399
5399
/// Returns the new state root of this fork.
5400
5400
/// `initialize_bonus` - if Some(..), then this snapshot is the first mined snapshot,
@@ -6608,7 +6608,7 @@ pub mod tests {
6608
6608
use crate :: core:: { StacksEpochExtension , * } ;
6609
6609
use crate :: util_lib:: db:: Error as db_error;
6610
6610
6611
- impl < ' a > SortitionHandleTx < ' a > {
6611
+ impl SortitionHandleTx < ' _ > {
6612
6612
/// Update the canonical Stacks tip (testing only)
6613
6613
pub fn test_update_canonical_stacks_tip (
6614
6614
& mut self ,
0 commit comments