Skip to content

Commit 8d5c4b2

Browse files
committed
Reformat and cleanup code and rename AElf.sln to AElf.All.sln
1 parent 41e76a8 commit 8d5c4b2

File tree

1,995 files changed

+131342
-131997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,995 files changed

+131342
-131997
lines changed

.idea/.idea.AElf.All/.idea/encodings.xml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.All/.idea/indexLayout.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.All/.idea/projectSettingsUpdater.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.All/.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.All/.idea/workspace.xml

+2,120
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.Contracts/.idea/.gitignore

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.Contracts/.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.Contracts/.idea/encodings.xml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.Contracts/.idea/indexLayout.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.AElf.Contracts/.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.all/.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.all/.idea/encodings.xml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.all/.idea/indexLayout.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.all/.idea/projectSettingsUpdater.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.all/.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.all/.idea/workspace.xml

+2,113
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AElf.All.sln

+1,256
Large diffs are not rendered by default.

AElf.Contracts.sln

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "contract", "contract", "{651F0F6E-86CF-42D2-9110-5F3EAE5704F0}"
4+
EndProject
5+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{26990847-E0A2-4FCC-8C71-267CA77557CD}"
6+
EndProject
7+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{51CE1A9E-63A0-49C6-B820-C8519C94F389}"
8+
EndProject
9+
Global
10+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
11+
Debug|Any CPU = Debug|Any CPU
12+
Release|Any CPU = Release|Any CPU
13+
EndGlobalSection
14+
EndGlobal

AElf.sln

+334-1,186
Large diffs are not rendered by default.

AElf.sln.DotSettings

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/CodeEditing/SuppressNullableWarningFix/Enabled/@EntryValue">False</s:Boolean>
23
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JS/@EntryIndexedValue">JS</s:String>
34
<s:Boolean x:Key="/Default/UserDictionary/Words/=aelf/@EntryIndexedValue">True</s:Boolean>
45
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean>

Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="src\AElf.ContractDeployer\AElf.ContractDeployer.targets" />
4-
<Import Project="AElf.ContractTools.targets" />
3+
<Import Project="src\AElf.ContractDeployer\AElf.ContractDeployer.targets"/>
4+
<Import Project="AElf.ContractTools.targets"/>
55
</Project>

azure-pipelines.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- task: UseDotNet@2
1212
displayName: 'Install .NET Core SDK'
1313
inputs:
14-
version: 6.0.5
14+
version: 6.0.x
1515
- script: choco install protoc --version=3.19.4 -y
1616
displayName: 'Install protobuf'
1717
- script: choco install unzip
@@ -47,7 +47,7 @@ jobs:
4747
- task: UseDotNet@2
4848
displayName: 'Install .NET Core SDK'
4949
inputs:
50-
version: 6.0.5
50+
version: 6.0.x
5151
- script: bash scripts/install_protobuf.sh
5252
- script: bash scripts/download_binary.sh
5353
- script: bash build.sh -target=Test-with-Codecov-N --parts=3 --n=2
@@ -80,7 +80,7 @@ jobs:
8080
- task: UseDotNet@2
8181
displayName: 'Install .NET Core SDK'
8282
inputs:
83-
version: 6.0.5
83+
version: 6.0.x
8484
- script: bash scripts/install_protobuf.sh
8585
- script: bash scripts/download_binary.sh
8686
- script: bash build.sh -target=Test-with-Codecov-N --parts=3 --n=3

bench/AElf.BenchBase/AElf.BenchBase.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Pro.NBench.xUnit" Version="2.0.0" />
9+
<PackageReference Include="Pro.NBench.xUnit" Version="2.0.0"/>
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<ProjectReference Include="..\..\test\AElf.TestBase\AElf.TestBase.csproj" />
13+
<ProjectReference Include="..\..\test\AElf.TestBase\AElf.TestBase.csproj"/>
1414
</ItemGroup>
1515

1616
</Project>

bench/AElf.BenchBase/Assembly.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
using Xunit;
22

3-
[assembly: CollectionBehavior(DisableTestParallelization = true)]
3+
[assembly: CollectionBehavior(DisableTestParallelization = true)]

bench/AElf.BenchBase/BenchBaseAElfModule.cs

+12-15
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@
22
using AElf.TestBase;
33
using Volo.Abp.Modularity;
44

5-
namespace AElf.BenchBase
5+
namespace AElf.BenchBase;
6+
7+
[DependsOn(typeof(TestBaseAElfModule))]
8+
public class BenchBaseAElfModule : AElfModule
9+
{
10+
}
11+
12+
public class BenchBaseTest<TModule> : AElfIntegratedTest<TModule>
13+
where TModule : IAbpModule
614
{
7-
[DependsOn(typeof(TestBaseAElfModule))]
8-
public class BenchBaseAElfModule : AElfModule
9-
{
10-
11-
}
12-
13-
public class BenchBaseTest<TModule> : AElfIntegratedTest<TModule>
14-
where TModule: IAbpModule
15-
{
16-
}
15+
}
1716

18-
public class BenchBaseTest : AElfIntegratedTest<TestBaseAElfModule>
19-
{
20-
21-
}
17+
public class BenchBaseTest : AElfIntegratedTest<TestBaseAElfModule>
18+
{
2219
}
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,40 @@
1-
using System;
21
using Google.Protobuf.WellKnownTypes;
32

4-
namespace AElf.Benchmark.PerformanceTestContract
3+
namespace AElf.Benchmark.PerformanceTestContract;
4+
5+
public class PerformanceTestContract : PerformanceTestContractContainer.PerformanceTestContractBase
56
{
6-
public class PerformanceTestContract : PerformanceTestContractContainer.PerformanceTestContractBase
7+
public override UInt64Value Fibonacci(UInt64Value input)
78
{
8-
public override UInt64Value Fibonacci(UInt64Value input)
9-
{
10-
var result = CalculateFibonacci(input.Value);
11-
return new UInt64Value {Value = result};
12-
}
9+
var result = CalculateFibonacci(input.Value);
10+
return new UInt64Value { Value = result };
11+
}
1312

14-
private ulong CalculateFibonacci(ulong n)
15-
{
16-
if (n == 0 || n == 1)
17-
return n;
18-
return CalculateFibonacci(n - 1) + CalculateFibonacci(n - 2);
19-
}
13+
private ulong CalculateFibonacci(ulong n)
14+
{
15+
if (n == 0 || n == 1)
16+
return n;
17+
return CalculateFibonacci(n - 1) + CalculateFibonacci(n - 2);
18+
}
2019

21-
public override Int32Value LoopExpNop(PerformanceTesteInput input)
20+
public override Int32Value LoopExpNop(PerformanceTesteInput input)
21+
{
22+
for (uint i = 0; i < input.N; i++)
2223
{
23-
for (uint i = 0; i < input.N; i++)
24-
{
25-
26-
}
27-
28-
return new Int32Value {Value = input.Seed};
2924
}
3025

31-
public override DoubleValue LoopDivAdd(DivAddTestInput input)
32-
{
33-
var r = input.X;
34-
for (uint i = 0; i < input.N; i++)
35-
{
36-
r /= input.Y;
37-
r += input.K;
38-
}
26+
return new Int32Value { Value = input.Seed };
27+
}
3928

40-
return new DoubleValue {Value = r};
29+
public override DoubleValue LoopDivAdd(DivAddTestInput input)
30+
{
31+
var r = input.X;
32+
for (uint i = 0; i < input.N; i++)
33+
{
34+
r /= input.Y;
35+
r += input.K;
4136
}
37+
38+
return new DoubleValue { Value = r };
4239
}
4340
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using AElf.Sdk.CSharp.State;
22

3-
namespace AElf.Benchmark.PerformanceTestContract
3+
namespace AElf.Benchmark.PerformanceTestContract;
4+
5+
public class PerformanceTestContractState : ContractState
46
{
5-
public class PerformanceTestContractState: ContractState
6-
{
7-
8-
}
97
}

bench/AElf.Benchmark/AElf.Benchmark.csproj

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
6-
<!-- <NoWarn>0436</NoWarn>-->
6+
<!-- <NoWarn>0436</NoWarn>-->
77
<OutputType>Exe</OutputType>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
12-
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" />
11+
<PackageReference Include="BenchmarkDotNet" Version="0.12.1"/>
12+
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1"/>
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\..\test\AElf.OS.Core.Tests\AElf.OS.Core.Tests.csproj" />
17-
<ProjectReference Include="..\..\src\AElf.Kernel.SmartContract.Parallel\AElf.Kernel.SmartContract.Parallel.csproj" />
18-
<ProjectReference Include="..\AElf.Benchmark.PerformanceTestContract\AElf.Benchmark.PerformanceTestContract.csproj" />
16+
<ProjectReference Include="..\..\test\AElf.OS.Core.Tests\AElf.OS.Core.Tests.csproj"/>
17+
<ProjectReference Include="..\..\src\AElf.Kernel.SmartContract.Parallel\AElf.Kernel.SmartContract.Parallel.csproj"/>
18+
<ProjectReference Include="..\AElf.Benchmark.PerformanceTestContract\AElf.Benchmark.PerformanceTestContract.csproj"/>
1919
</ItemGroup>
2020
<ItemGroup>
21-
<ProjectReference Include="..\..\contract\AElf.Contracts.Genesis\AElf.Contracts.Genesis.csproj" />
21+
<ProjectReference Include="..\..\contract\AElf.Contracts.Genesis\AElf.Contracts.Genesis.csproj"/>
2222
<ProjectReference Include="..\..\contract\AElf.Contracts.Consensus.AEDPoS\AElf.Contracts.Consensus.AEDPoS.csproj">
2323
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
2424
<OutputItemType>Contract</OutputItemType>

0 commit comments

Comments
 (0)