Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin desc and fix ut #257

Merged
merged 3 commits into from
Jun 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ApplicationLogs/LogReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class LogReader : Plugin, IPersistencePlugin

public override string Name => "ApplicationLogs";

public override string Description => "Synchronizes the smart contract log with the NativeContract log (Notify)";

public LogReader()
{
db = DB.Open(GetFullPath(Settings.Default.Path), new Options { CreateIfMissing = true });
Expand Down
2 changes: 1 addition & 1 deletion src/LevelDBStore/LevelDBStore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00909" />
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions src/LevelDBStore/Plugins/Storage/LevelDBStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ public class LevelDBStore : Plugin, IStoragePlugin
{
private string path;

public override string Description => "Uses LevelDB to store the blockchain data";

protected override void Configure()
{
path = string.Format(GetConfiguration().GetSection("Path").Value ?? "Data_LevelDB_{0}", ProtocolSettings.Default.Magic.ToString("X8"));
Expand Down
2 changes: 2 additions & 0 deletions src/RocksDBStore/Plugins/Storage/RocksDBStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ namespace Neo.Plugins.Storage
{
public class RocksDBStore : Plugin, IStoragePlugin
{
public override string Description => "Uses RocksDBStore to store the blockchain data";

/// <summary>
/// Configure
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/RocksDBStore/RocksDBStore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00909" />
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
<PackageReference Include="RocksDbNative" Version="6.2.2" />
<PackageReference Include="RocksDbSharp" Version="6.2.2" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/RpcClient/ContractClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Transaction CreateDeployContractTx(byte[] contractScript, ContractManifes
byte[] script;
using (ScriptBuilder sb = new ScriptBuilder())
{
sb.EmitSysCall(InteropService.Contract.Create, contractScript, manifest.ToString());
sb.EmitSysCall(ApplicationEngine.System_Contract_Create, contractScript, manifest.ToString());
script = sb.ToArray();
}

Expand Down
2 changes: 1 addition & 1 deletion src/RpcClient/RpcClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00909" />
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions src/RpcNep5Tracker/RpcNep5Tracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class RpcNep5Tracker : Plugin, IPersistencePlugin
private uint _maxResults;
private Snapshot _levelDbSnapshot;

public override string Description => "Enquiries NEP-5 balance and transactions history of accounts through RPC";

public RpcNep5Tracker()
{
RpcServerPlugin.RegisterMethods(this);
Expand Down
2 changes: 1 addition & 1 deletion src/RpcServer/RpcServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.2.0" />
<PackageReference Include="Neo" Version="3.0.0-CI00929" />
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/RpcServer/RpcServerPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public sealed class RpcServerPlugin : Plugin
{
static List<object> handlers = new List<object>();
public override string Name => "RpcServer";
public override string Description => "Enables RPC for the node";
RpcServer server;
RpcServerSettings settings;

Expand Down
2 changes: 2 additions & 0 deletions src/StatesDumper/StatesDumper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class StatesDumper : Plugin, IPersistencePlugin
{
private readonly JArray bs_cache = new JArray();

public override string Description => "Exports Neo-CLI status data";

protected override void Configure()
{
Settings.Load(GetConfiguration());
Expand Down
2 changes: 1 addition & 1 deletion src/StatesDumper/StatesDumper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00909" />
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
<PackageReference Include="Neo.ConsoleService" Version="1.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion tests/Neo.Network.RPC.Tests/UT_ContractClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void TestDeployContract()
manifest.Features = ContractFeatures.HasStorage | ContractFeatures.Payable;
using (ScriptBuilder sb = new ScriptBuilder())
{
sb.EmitSysCall(InteropService.Contract.Create, new byte[1], manifest.ToString());
sb.EmitSysCall(ApplicationEngine.System_Contract_Create, new byte[1], manifest.ToString());
script = sb.ToArray();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Neo.Network.RPC.Tests/UT_TransactionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void TestSign()

Assert.IsTrue(Crypto.VerifySignature(tx.GetHashData(), signature, keyPair1.PublicKey));
// verify network fee and system fee
long networkFee = tx.Size * (long)1000 + ApplicationEngine.OpCodePrices[OpCode.PUSHDATA1] + ApplicationEngine.OpCodePrices[OpCode.PUSHDATA1] + ApplicationEngine.OpCodePrices[OpCode.PUSHNULL] + InteropService.GetPrice(InteropService.Crypto.VerifyWithECDsaSecp256r1, null, null);
long networkFee = tx.Size * (long)1000 + ApplicationEngine.OpCodePrices[OpCode.PUSHDATA1] + ApplicationEngine.OpCodePrices[OpCode.PUSHDATA1] + ApplicationEngine.OpCodePrices[OpCode.PUSHNULL] + ApplicationEngine.ECDsaVerifyPrice * 1;
Assert.AreEqual(networkFee, tx.NetworkFee);
Assert.AreEqual(100, tx.SystemFee);

Expand Down