File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -154,10 +154,10 @@ impl OrphanPool {
154
154
self . limit_size ( )
155
155
}
156
156
157
- pub fn find_by_previous ( & self , tx : & TransactionView ) -> Vec < ProposalShortId > {
157
+ pub fn find_by_previous ( & self , tx : & TransactionView ) -> Vec < & ProposalShortId > {
158
158
tx. output_pts ( )
159
159
. iter ( )
160
- . filter_map ( |out_point| self . by_out_point . get ( out_point) . cloned ( ) )
160
+ . filter_map ( |out_point| self . by_out_point . get ( out_point) )
161
161
. flatten ( )
162
162
. collect :: < Vec < _ > > ( )
163
163
}
Original file line number Diff line number Diff line change @@ -46,13 +46,13 @@ fn test_orphan_duplicated() {
46
46
47
47
let txs = orphan. find_by_previous ( & tx1) ;
48
48
assert_eq ! ( txs. len( ) , 3 ) ;
49
- assert ! ( txs. contains( & tx2. proposal_short_id( ) ) ) ;
50
- assert ! ( txs. contains( & tx4. proposal_short_id( ) ) ) ;
51
- assert ! ( txs. contains( & tx5. proposal_short_id( ) ) ) ;
49
+ assert ! ( txs. contains( && tx2. proposal_short_id( ) ) ) ;
50
+ assert ! ( txs. contains( && tx4. proposal_short_id( ) ) ) ;
51
+ assert ! ( txs. contains( && tx5. proposal_short_id( ) ) ) ;
52
52
53
53
orphan. remove_orphan_tx ( & tx4. proposal_short_id ( ) ) ;
54
54
let txs = orphan. find_by_previous ( & tx1) ;
55
55
assert_eq ! ( txs. len( ) , 2 ) ;
56
- assert ! ( txs. contains( & tx2. proposal_short_id( ) ) ) ;
57
- assert ! ( txs. contains( & tx5. proposal_short_id( ) ) ) ;
56
+ assert ! ( txs. contains( && tx2. proposal_short_id( ) ) ) ;
57
+ assert ! ( txs. contains( && tx5. proposal_short_id( ) ) ) ;
58
58
}
You can’t perform that action at this time.
0 commit comments