@@ -27,7 +27,7 @@ impl Exist<MessageId, Message> for Storage {
27
27
fn exist ( & self , message_id : & MessageId ) -> Result < bool , <Self as StorageBackend >:: Error > {
28
28
Ok ( self
29
29
. inner
30
- . get_cf ( self . cf_handle ( CF_MESSAGE_ID_TO_MESSAGE ) ?, message_id) ?
30
+ . get_pinned_cf ( self . cf_handle ( CF_MESSAGE_ID_TO_MESSAGE ) ?, message_id) ?
31
31
. is_some ( ) )
32
32
}
33
33
}
@@ -38,7 +38,7 @@ impl Exist<MessageId, MessageMetadata> for Storage {
38
38
39
39
let exists = self
40
40
. inner
41
- . get_cf ( self . cf_handle ( CF_MESSAGE_ID_TO_METADATA ) ?, message_id) ?
41
+ . get_pinned_cf ( self . cf_handle ( CF_MESSAGE_ID_TO_METADATA ) ?, message_id) ?
42
42
. is_some ( ) ;
43
43
44
44
drop ( guard) ;
@@ -54,7 +54,7 @@ impl Exist<(MessageId, MessageId), ()> for Storage {
54
54
55
55
Ok ( self
56
56
. inner
57
- . get_cf ( self . cf_handle ( CF_MESSAGE_ID_TO_MESSAGE_ID ) ?, key) ?
57
+ . get_pinned_cf ( self . cf_handle ( CF_MESSAGE_ID_TO_MESSAGE_ID ) ?, key) ?
58
58
. is_some ( ) )
59
59
}
60
60
}
@@ -66,7 +66,7 @@ impl Exist<(PaddedIndex, MessageId), ()> for Storage {
66
66
67
67
Ok ( self
68
68
. inner
69
- . get_cf ( self . cf_handle ( CF_INDEX_TO_MESSAGE_ID ) ?, key) ?
69
+ . get_pinned_cf ( self . cf_handle ( CF_INDEX_TO_MESSAGE_ID ) ?, key) ?
70
70
. is_some ( ) )
71
71
}
72
72
}
@@ -75,7 +75,7 @@ impl Exist<OutputId, CreatedOutput> for Storage {
75
75
fn exist ( & self , output_id : & OutputId ) -> Result < bool , <Self as StorageBackend >:: Error > {
76
76
Ok ( self
77
77
. inner
78
- . get_cf ( self . cf_handle ( CF_OUTPUT_ID_TO_CREATED_OUTPUT ) ?, output_id. pack_new ( ) ) ?
78
+ . get_pinned_cf ( self . cf_handle ( CF_OUTPUT_ID_TO_CREATED_OUTPUT ) ?, output_id. pack_new ( ) ) ?
79
79
. is_some ( ) )
80
80
}
81
81
}
@@ -84,7 +84,7 @@ impl Exist<OutputId, ConsumedOutput> for Storage {
84
84
fn exist ( & self , output_id : & OutputId ) -> Result < bool , <Self as StorageBackend >:: Error > {
85
85
Ok ( self
86
86
. inner
87
- . get_cf ( self . cf_handle ( CF_OUTPUT_ID_TO_CONSUMED_OUTPUT ) ?, output_id. pack_new ( ) ) ?
87
+ . get_pinned_cf ( self . cf_handle ( CF_OUTPUT_ID_TO_CONSUMED_OUTPUT ) ?, output_id. pack_new ( ) ) ?
88
88
. is_some ( ) )
89
89
}
90
90
}
@@ -93,7 +93,7 @@ impl Exist<Unspent, ()> for Storage {
93
93
fn exist ( & self , unspent : & Unspent ) -> Result < bool , <Self as StorageBackend >:: Error > {
94
94
Ok ( self
95
95
. inner
96
- . get_cf ( self . cf_handle ( CF_OUTPUT_ID_UNSPENT ) ?, unspent. pack_new ( ) ) ?
96
+ . get_pinned_cf ( self . cf_handle ( CF_OUTPUT_ID_UNSPENT ) ?, unspent. pack_new ( ) ) ?
97
97
. is_some ( ) )
98
98
}
99
99
}
@@ -108,22 +108,25 @@ impl Exist<(Ed25519Address, OutputId), ()> for Storage {
108
108
109
109
Ok ( self
110
110
. inner
111
- . get_cf ( self . cf_handle ( CF_ED25519_ADDRESS_TO_OUTPUT_ID ) ?, key) ?
111
+ . get_pinned_cf ( self . cf_handle ( CF_ED25519_ADDRESS_TO_OUTPUT_ID ) ?, key) ?
112
112
. is_some ( ) )
113
113
}
114
114
}
115
115
116
116
impl Exist < ( ) , LedgerIndex > for Storage {
117
117
fn exist ( & self , ( ) : & ( ) ) -> Result < bool , <Self as StorageBackend >:: Error > {
118
- Ok ( self . inner . get_cf ( self . cf_handle ( CF_LEDGER_INDEX ) ?, [ 0x00u8 ] ) ?. is_some ( ) )
118
+ Ok ( self
119
+ . inner
120
+ . get_pinned_cf ( self . cf_handle ( CF_LEDGER_INDEX ) ?, [ 0x00u8 ] ) ?
121
+ . is_some ( ) )
119
122
}
120
123
}
121
124
122
125
impl Exist < MilestoneIndex , Milestone > for Storage {
123
126
fn exist ( & self , index : & MilestoneIndex ) -> Result < bool , <Self as StorageBackend >:: Error > {
124
127
Ok ( self
125
128
. inner
126
- . get_cf ( self . cf_handle ( CF_MILESTONE_INDEX_TO_MILESTONE ) ?, index. pack_new ( ) ) ?
129
+ . get_pinned_cf ( self . cf_handle ( CF_MILESTONE_INDEX_TO_MILESTONE ) ?, index. pack_new ( ) ) ?
127
130
. is_some ( ) )
128
131
}
129
132
}
@@ -132,7 +135,7 @@ impl Exist<(), SnapshotInfo> for Storage {
132
135
fn exist ( & self , ( ) : & ( ) ) -> Result < bool , <Self as StorageBackend >:: Error > {
133
136
Ok ( self
134
137
. inner
135
- . get_cf ( self . cf_handle ( CF_SNAPSHOT_INFO ) ?, [ 0x00u8 ] ) ?
138
+ . get_pinned_cf ( self . cf_handle ( CF_SNAPSHOT_INFO ) ?, [ 0x00u8 ] ) ?
136
139
. is_some ( ) )
137
140
}
138
141
}
@@ -141,7 +144,7 @@ impl Exist<SolidEntryPoint, MilestoneIndex> for Storage {
141
144
fn exist ( & self , sep : & SolidEntryPoint ) -> Result < bool , <Self as StorageBackend >:: Error > {
142
145
Ok ( self
143
146
. inner
144
- . get_cf ( self . cf_handle ( CF_SOLID_ENTRY_POINT_TO_MILESTONE_INDEX ) ?, sep. pack_new ( ) ) ?
147
+ . get_pinned_cf ( self . cf_handle ( CF_SOLID_ENTRY_POINT_TO_MILESTONE_INDEX ) ?, sep. pack_new ( ) ) ?
145
148
. is_some ( ) )
146
149
}
147
150
}
@@ -150,7 +153,7 @@ impl Exist<MilestoneIndex, OutputDiff> for Storage {
150
153
fn exist ( & self , index : & MilestoneIndex ) -> Result < bool , <Self as StorageBackend >:: Error > {
151
154
Ok ( self
152
155
. inner
153
- . get_cf ( self . cf_handle ( CF_MILESTONE_INDEX_TO_OUTPUT_DIFF ) ?, index. pack_new ( ) ) ?
156
+ . get_pinned_cf ( self . cf_handle ( CF_MILESTONE_INDEX_TO_OUTPUT_DIFF ) ?, index. pack_new ( ) ) ?
154
157
. is_some ( ) )
155
158
}
156
159
}
@@ -159,7 +162,7 @@ impl Exist<Address, Balance> for Storage {
159
162
fn exist ( & self , address : & Address ) -> Result < bool , <Self as StorageBackend >:: Error > {
160
163
Ok ( self
161
164
. inner
162
- . get_cf ( self . cf_handle ( CF_ADDRESS_TO_BALANCE ) ?, address. pack_new ( ) ) ?
165
+ . get_pinned_cf ( self . cf_handle ( CF_ADDRESS_TO_BALANCE ) ?, address. pack_new ( ) ) ?
163
166
. is_some ( ) )
164
167
}
165
168
}
@@ -174,7 +177,7 @@ impl Exist<(MilestoneIndex, UnreferencedMessage), ()> for Storage {
174
177
175
178
Ok ( self
176
179
. inner
177
- . get_cf ( self . cf_handle ( CF_MILESTONE_INDEX_TO_UNREFERENCED_MESSAGE ) ?, key) ?
180
+ . get_pinned_cf ( self . cf_handle ( CF_MILESTONE_INDEX_TO_UNREFERENCED_MESSAGE ) ?, key) ?
178
181
. is_some ( ) )
179
182
}
180
183
}
@@ -186,7 +189,7 @@ impl Exist<(MilestoneIndex, Receipt), ()> for Storage {
186
189
187
190
Ok ( self
188
191
. inner
189
- . get_cf ( self . cf_handle ( CF_MILESTONE_INDEX_TO_RECEIPT ) ?, key) ?
192
+ . get_pinned_cf ( self . cf_handle ( CF_MILESTONE_INDEX_TO_RECEIPT ) ?, key) ?
190
193
. is_some ( ) )
191
194
}
192
195
}
@@ -198,7 +201,7 @@ impl Exist<(bool, TreasuryOutput), ()> for Storage {
198
201
199
202
Ok ( self
200
203
. inner
201
- . get_cf ( self . cf_handle ( CF_SPENT_TO_TREASURY_OUTPUT ) ?, key) ?
204
+ . get_pinned_cf ( self . cf_handle ( CF_SPENT_TO_TREASURY_OUTPUT ) ?, key) ?
202
205
. is_some ( ) )
203
206
}
204
207
}
0 commit comments