@@ -10,19 +10,24 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
10
10
11
11
pub use balances:: Call as BalancesCall ;
12
12
pub use frame_support:: {
13
- construct_runtime, parameter_types, traits:: Randomness , weights:: {
13
+ construct_runtime, parameter_types, StorageValue ,
14
+ traits:: {
15
+ KeyOwnerProofSystem , Randomness ,
16
+ } ,
17
+ weights:: {
14
18
Weight , IdentityFee , constants:: RocksDbWeight ,
15
- } , StorageValue ,
19
+ } ,
16
20
} ;
17
21
use grandpa:: fg_primitives;
18
- use grandpa:: AuthorityList as GrandpaAuthorityList ;
22
+ use grandpa:: { AuthorityId as GrandpaId , AuthorityList as GrandpaAuthorityList } ;
19
23
use hash256_std_hasher:: Hash256StdHasher ;
20
24
use sha3:: { Digest , Keccak256 } ;
21
25
use sp_api:: impl_runtime_apis;
22
26
use sp_consensus_aura:: sr25519:: AuthorityId as AuraId ;
23
- use sp_core:: { Hasher , OpaqueMetadata } ;
27
+ use sp_core:: { crypto :: KeyTypeId , Hasher , OpaqueMetadata } ;
24
28
use sp_runtime:: traits:: {
25
- BlakeTwo256 , Block as BlockT , IdentifyAccount , IdentityLookup , Saturating , Verify ,
29
+ BlakeTwo256 , Block as BlockT , IdentifyAccount , IdentityLookup , NumberFor ,
30
+ Saturating , Verify ,
26
31
} ;
27
32
#[ cfg( any( feature = "std" , test) ) ]
28
33
pub use sp_runtime:: BuildStorage ;
@@ -206,6 +211,19 @@ impl aura::Trait for Runtime {
206
211
207
212
impl grandpa:: Trait for Runtime {
208
213
type Event = Event ;
214
+ type Call = Call ;
215
+
216
+ type KeyOwnerProofSystem = ( ) ;
217
+
218
+ type KeyOwnerProof =
219
+ <Self :: KeyOwnerProofSystem as KeyOwnerProofSystem < ( KeyTypeId , GrandpaId ) > >:: Proof ;
220
+
221
+ type KeyOwnerIdentification = <Self :: KeyOwnerProofSystem as KeyOwnerProofSystem < (
222
+ KeyTypeId ,
223
+ GrandpaId ,
224
+ ) > >:: IdentificationTuple ;
225
+
226
+ type HandleEquivocation = ( ) ;
209
227
type WeightInfo = ( ) ;
210
228
}
211
229
@@ -223,9 +241,11 @@ impl timestamp::Trait for Runtime {
223
241
224
242
parameter_types ! {
225
243
pub const ExistentialDeposit : u128 = 500 ;
244
+ pub const MaxLocks : u32 = 50 ;
226
245
}
227
246
228
247
impl balances:: Trait for Runtime {
248
+ type MaxLocks = MaxLocks ;
229
249
/// The type for recording an account's balance.
230
250
type Balance = Balance ;
231
251
/// The ubiquitous event type.
@@ -383,7 +403,7 @@ impl_runtime_apis! {
383
403
384
404
fn decode_session_keys(
385
405
encoded: Vec <u8 >,
386
- ) -> Option <Vec <( Vec <u8 >, sp_core :: crypto :: KeyTypeId ) >> {
406
+ ) -> Option <Vec <( Vec <u8 >, KeyTypeId ) >> {
387
407
opaque:: SessionKeys :: decode_into_raw_public_keys( & encoded)
388
408
}
389
409
}
@@ -392,5 +412,25 @@ impl_runtime_apis! {
392
412
fn grandpa_authorities( ) -> GrandpaAuthorityList {
393
413
Grandpa :: grandpa_authorities( )
394
414
}
415
+
416
+ fn submit_report_equivocation_unsigned_extrinsic(
417
+ _equivocation_proof: fg_primitives:: EquivocationProof <
418
+ <Block as BlockT >:: Hash ,
419
+ NumberFor <Block >,
420
+ >,
421
+ _key_owner_proof: fg_primitives:: OpaqueKeyOwnershipProof ,
422
+ ) -> Option <( ) > {
423
+ None
424
+ }
425
+
426
+ fn generate_key_ownership_proof(
427
+ _set_id: fg_primitives:: SetId ,
428
+ _authority_id: GrandpaId ,
429
+ ) -> Option <fg_primitives:: OpaqueKeyOwnershipProof > {
430
+ // NOTE: this is the only implementation possible since we've
431
+ // defined our key owner proof type as a bottom type (i.e. a type
432
+ // with no values).
433
+ None
434
+ }
395
435
}
396
436
}
0 commit comments