forked from neo-project/neo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright (C) 2015-2024 The Neo Project. | ||
// | ||
// TestP2PSettings.cs file belongs to the neo project and is free | ||
// software distributed under the MIT software license, see the | ||
// accompanying file LICENSE in the main directory of the | ||
// repository or http://www.opensource.org/licenses/mit-license.php | ||
// for more details. | ||
// | ||
// Redistribution and use in source and binary forms with or without | ||
// modifications are permitted. | ||
|
||
namespace Neo.Plugins.RpcServer.Tests; | ||
|
||
public class TestP2PSettings | ||
{ | ||
public ushort Port { get; init; } | ||
public int MinDesiredConnections { get; } = 5; | ||
public int MaxConnections { get; } = 20; | ||
public int MaxConnectionsPerAddress { get; } = 10; | ||
|
||
public static readonly TestP2PSettings Node1 = new() | ||
{ | ||
Port = 30333 | ||
}; | ||
|
||
public static readonly TestP2PSettings Node2 = new() | ||
{ | ||
Port = 30334 | ||
}; | ||
|
||
public static readonly TestP2PSettings Node3 = new() | ||
{ | ||
Port = 30335 | ||
}; | ||
|
||
public static readonly TestP2PSettings Node4 = new() | ||
{ | ||
Port = 30336 | ||
}; | ||
|
||
public static readonly TestP2PSettings Node5 = new() | ||
{ | ||
Port = 30337 | ||
}; | ||
|
||
public static readonly TestP2PSettings Node6 = new() | ||
{ | ||
Port = 30338 | ||
}; | ||
|
||
public static readonly TestP2PSettings Node7 = new() | ||
{ | ||
Port = 30339 | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (C) 2015-2024 The Neo Project. | ||
// | ||
// TestWalletProvider.cs file belongs to the neo project and is free | ||
// software distributed under the MIT software license, see the | ||
// accompanying file LICENSE in the main directory of the | ||
// repository or http://www.opensource.org/licenses/mit-license.php | ||
// for more details. | ||
// | ||
// Redistribution and use in source and binary forms with or without | ||
// modifications are permitted. | ||
|
||
using Neo.UnitTests; | ||
using Neo.Wallets; | ||
using Neo.Wallets.NEP6; | ||
using System; | ||
|
||
namespace Neo.Plugins.RpcServer.Tests; | ||
|
||
public class TestWalletProvider(string wif) : IWalletProvider | ||
{ | ||
public event EventHandler<Wallet> WalletChanged; | ||
|
||
private Wallet Wallet | ||
{ | ||
get | ||
{ | ||
var wallet = TestUtils.GenerateTestWallet("123"); | ||
var privateKey = Wallet.GetPrivateKeyFromWIF(wif); | ||
wallet.CreateAccount(privateKey); | ||
return wallet; | ||
} | ||
} | ||
|
||
public Wallet GetWallet() => Wallet; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"PluginConfiguration": { | ||
"RecoveryLogs": "ConsensusState", | ||
"IgnoreRecoveryLogs": false, | ||
"AutoStart": true, | ||
"Network": 860833102, | ||
"MaxBlockSize": 2097152, | ||
"MaxBlockSystemFee": 150000000000, | ||
"UnhandledExceptionPolicy": "StopNode" | ||
} | ||
} |