81
81
}
82
82
83
83
/// Params required to start the instant sealing authorship task.
84
- pub struct ManualSealParams < B : BlockT , BI , E , C : ProvideRuntimeApi < B > , TP , SC , CS , CIDP > {
84
+ pub struct ManualSealParams < B : BlockT , BI , E , C : ProvideRuntimeApi < B > , TP , SC , CS , CIDP , P > {
85
85
/// Block import instance for well. importing blocks.
86
86
pub block_import : BI ,
87
87
@@ -103,14 +103,14 @@ pub struct ManualSealParams<B: BlockT, BI, E, C: ProvideRuntimeApi<B>, TP, SC, C
103
103
104
104
/// Digest provider for inclusion in blocks.
105
105
pub consensus_data_provider :
106
- Option < Box < dyn ConsensusDataProvider < B , Transaction = TransactionFor < C , B > > > > ,
106
+ Option < Box < dyn ConsensusDataProvider < B , Proof = P , Transaction = TransactionFor < C , B > > > > ,
107
107
108
108
/// Something that can create the inherent data providers.
109
109
pub create_inherent_data_providers : CIDP ,
110
110
}
111
111
112
112
/// Params required to start the manual sealing authorship task.
113
- pub struct InstantSealParams < B : BlockT , BI , E , C : ProvideRuntimeApi < B > , TP , SC , CIDP > {
113
+ pub struct InstantSealParams < B : BlockT , BI , E , C : ProvideRuntimeApi < B > , TP , SC , CIDP , P > {
114
114
/// Block import instance for well. importing blocks.
115
115
pub block_import : BI ,
116
116
@@ -128,14 +128,14 @@ pub struct InstantSealParams<B: BlockT, BI, E, C: ProvideRuntimeApi<B>, TP, SC,
128
128
129
129
/// Digest provider for inclusion in blocks.
130
130
pub consensus_data_provider :
131
- Option < Box < dyn ConsensusDataProvider < B , Transaction = TransactionFor < C , B > > > > ,
131
+ Option < Box < dyn ConsensusDataProvider < B , Proof = P , Transaction = TransactionFor < C , B > > > > ,
132
132
133
133
/// Something that can create the inherent data providers.
134
134
pub create_inherent_data_providers : CIDP ,
135
135
}
136
136
137
137
/// Creates the background authorship task for the manual seal engine.
138
- pub async fn run_manual_seal < B , BI , CB , E , C , TP , SC , CS , CIDP > (
138
+ pub async fn run_manual_seal < B , BI , CB , E , C , TP , SC , CS , CIDP , P > (
139
139
ManualSealParams {
140
140
mut block_import,
141
141
mut env,
@@ -145,7 +145,7 @@ pub async fn run_manual_seal<B, BI, CB, E, C, TP, SC, CS, CIDP>(
145
145
select_chain,
146
146
consensus_data_provider,
147
147
create_inherent_data_providers,
148
- } : ManualSealParams < B , BI , E , C , TP , SC , CS , CIDP > ,
148
+ } : ManualSealParams < B , BI , E , C , TP , SC , CS , CIDP , P > ,
149
149
) where
150
150
B : BlockT + ' static ,
151
151
BI : BlockImport < B , Error = sp_consensus:: Error , Transaction = sp_api:: TransactionFor < C , B > >
@@ -155,12 +155,13 @@ pub async fn run_manual_seal<B, BI, CB, E, C, TP, SC, CS, CIDP>(
155
155
C : HeaderBackend < B > + Finalizer < B , CB > + ProvideRuntimeApi < B > + ' static ,
156
156
CB : ClientBackend < B > + ' static ,
157
157
E : Environment < B > + ' static ,
158
- E :: Proposer : Proposer < B , Transaction = TransactionFor < C , B > > ,
158
+ E :: Proposer : Proposer < B , Proof = P , Transaction = TransactionFor < C , B > > ,
159
159
CS : Stream < Item = EngineCommand < <B as BlockT >:: Hash > > + Unpin + ' static ,
160
160
SC : SelectChain < B > + ' static ,
161
161
TransactionFor < C , B > : ' static ,
162
162
TP : TransactionPool < Block = B > ,
163
163
CIDP : CreateInherentDataProviders < B , ( ) > ,
164
+ P : Send + Sync + ' static ,
164
165
{
165
166
while let Some ( command) = commands_stream. next ( ) . await {
166
167
match command {
@@ -198,7 +199,7 @@ pub async fn run_manual_seal<B, BI, CB, E, C, TP, SC, CS, CIDP>(
198
199
/// runs the background authorship task for the instant seal engine.
199
200
/// instant-seal creates a new block for every transaction imported into
200
201
/// the transaction pool.
201
- pub async fn run_instant_seal < B , BI , CB , E , C , TP , SC , CIDP > (
202
+ pub async fn run_instant_seal < B , BI , CB , E , C , TP , SC , CIDP , P > (
202
203
InstantSealParams {
203
204
block_import,
204
205
env,
@@ -207,7 +208,7 @@ pub async fn run_instant_seal<B, BI, CB, E, C, TP, SC, CIDP>(
207
208
select_chain,
208
209
consensus_data_provider,
209
210
create_inherent_data_providers,
210
- } : InstantSealParams < B , BI , E , C , TP , SC , CIDP > ,
211
+ } : InstantSealParams < B , BI , E , C , TP , SC , CIDP , P > ,
211
212
) where
212
213
B : BlockT + ' static ,
213
214
BI : BlockImport < B , Error = sp_consensus:: Error , Transaction = sp_api:: TransactionFor < C , B > >
@@ -217,11 +218,12 @@ pub async fn run_instant_seal<B, BI, CB, E, C, TP, SC, CIDP>(
217
218
C : HeaderBackend < B > + Finalizer < B , CB > + ProvideRuntimeApi < B > + ' static ,
218
219
CB : ClientBackend < B > + ' static ,
219
220
E : Environment < B > + ' static ,
220
- E :: Proposer : Proposer < B , Transaction = TransactionFor < C , B > > ,
221
+ E :: Proposer : Proposer < B , Proof = P , Transaction = TransactionFor < C , B > > ,
221
222
SC : SelectChain < B > + ' static ,
222
223
TransactionFor < C , B > : ' static ,
223
224
TP : TransactionPool < Block = B > ,
224
225
CIDP : CreateInherentDataProviders < B , ( ) > ,
226
+ P : Send + Sync + ' static ,
225
227
{
226
228
// instant-seal creates blocks as soon as transactions are imported
227
229
// into the transaction pool.
@@ -275,6 +277,7 @@ mod tests {
275
277
C : ProvideRuntimeApi < B > + Send + Sync ,
276
278
{
277
279
type Transaction = TransactionFor < C , B > ;
280
+ type Proof = ( ) ;
278
281
279
282
fn create_digest (
280
283
& self ,
@@ -289,6 +292,7 @@ mod tests {
289
292
_parent : & B :: Header ,
290
293
params : & mut BlockImportParams < B , Self :: Transaction > ,
291
294
_inherents : & InherentData ,
295
+ _proof : Self :: Proof ,
292
296
) -> Result < ( ) , Error > {
293
297
params. post_digests . push ( DigestItem :: Other ( vec ! [ 1 ] ) ) ;
294
298
Ok ( ( ) )
0 commit comments