Add .editorconfig and format code style (#115)

* Add .editorconfig and format code style

* Enforce line length to be smaller than 100
main
zxchen 2020-12-11 00:57:04 +01:00 committed by GitHub
parent 72c1548ec6
commit 4d97032c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 13 deletions

22
.editorconfig 100644
View File

@ -0,0 +1,22 @@
root = true
[*.rs]
indent_style=tab
indent_size=tab
tab_width=4
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
max_line_length=100
insert_final_newline=true
[*.yml]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf
[*.sh]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf

View File

@ -349,7 +349,8 @@ impl_runtime_apis! {
Executive::finalize_block() Executive::finalize_block()
} }
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> { fn inherent_extrinsics(data: sp_inherents::InherentData) ->
Vec<<Block as BlockT>::Extrinsic> {
data.create_extrinsics() data.create_extrinsics()
} }
@ -434,7 +435,8 @@ impl_runtime_apis! {
} }
} }
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime { impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
for Runtime {
fn query_info( fn query_info(
uxt: <Block as BlockT>::Extrinsic, uxt: <Block as BlockT>::Extrinsic,
len: u32, len: u32,
@ -455,15 +457,20 @@ impl_runtime_apis! {
let whitelist: Vec<TrackedStorageKey> = vec![ let whitelist: Vec<TrackedStorageKey> = vec![
// Block Number // Block Number
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac")
.to_vec().into(),
// Total Issuance // Total Issuance
hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80")
.to_vec().into(),
// Execution Phase // Execution Phase
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a")
.to_vec().into(),
// Event Count // Event Count
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850")
.to_vec().into(),
// System Events // System Events
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7")
.to_vec().into(),
]; ];
let mut batches = Vec::<BenchmarkBatch>::new(); let mut batches = Vec::<BenchmarkBatch>::new();