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

Fix default network number #2555

Merged
merged 2 commits into from
Aug 2, 2021
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: 1 addition & 1 deletion src/neo/ProtocolSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public record ProtocolSettings
/// </summary>
public static ProtocolSettings Default { get; } = new ProtocolSettings
{
Network = 0x4F454Eu,
Network = 0x334F454Eu,
AddressVersion = 0x35,
StandbyCommittee = new[]
{
Expand Down
20 changes: 10 additions & 10 deletions tests/neo.UnitTests/SmartContract/UT_ApplicationEngine.Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public void TestGetRandomSameBlock()
var rand_9 = engine_2.GetRandom();
var rand_10 = engine_2.GetRandom();

rand_1.Should().Be(BigInteger.Parse("225932872514876835587448704843370203748"));
rand_2.Should().Be(BigInteger.Parse("190129535548110356450238097068474508661"));
rand_3.Should().Be(BigInteger.Parse("48930406787011198493485648810190184269"));
rand_4.Should().Be(BigInteger.Parse("66199389469641263539889463157823839112"));
rand_5.Should().Be(BigInteger.Parse("217172703763162599519098299724476526911"));
rand_1.Should().Be(BigInteger.Parse("271339657438512451304577787170704246350"));
rand_2.Should().Be(BigInteger.Parse("3519468259280385525954723453894821326"));
rand_3.Should().Be(BigInteger.Parse("109167038153789065876532298231776118857"));
rand_4.Should().Be(BigInteger.Parse("278188388582393629262399165075733096984"));
rand_5.Should().Be(BigInteger.Parse("252973537848551880583287107760169066816"));

rand_1.Should().Be(rand_6);
rand_2.Should().Be(rand_7);
Expand Down Expand Up @@ -79,11 +79,11 @@ public void TestGetRandomDifferentBlock()
var rand_9 = engine_2.GetRandom();
var rand_10 = engine_2.GetRandom();

rand_1.Should().Be(BigInteger.Parse("225932872514876835587448704843370203748"));
rand_2.Should().Be(BigInteger.Parse("190129535548110356450238097068474508661"));
rand_3.Should().Be(BigInteger.Parse("48930406787011198493485648810190184269"));
rand_4.Should().Be(BigInteger.Parse("66199389469641263539889463157823839112"));
rand_5.Should().Be(BigInteger.Parse("217172703763162599519098299724476526911"));
rand_1.Should().Be(BigInteger.Parse("271339657438512451304577787170704246350"));
rand_2.Should().Be(BigInteger.Parse("3519468259280385525954723453894821326"));
rand_3.Should().Be(BigInteger.Parse("109167038153789065876532298231776118857"));
rand_4.Should().Be(BigInteger.Parse("278188388582393629262399165075733096984"));
rand_5.Should().Be(BigInteger.Parse("252973537848551880583287107760169066816"));

rand_1.Should().NotBe(rand_6);
rand_2.Should().NotBe(rand_7);
Expand Down
2 changes: 1 addition & 1 deletion tests/neo.UnitTests/UT_Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void GetSignData()
{
TestVerifiable verifiable = new();
byte[] res = verifiable.GetSignData(ProtocolSettings.Default.Network);
res.ToHexString().Should().Be("4e454f0050b51da6bb366be3ea50140cda45ba7df575287c0371000b2037ed3898ff8bf5");
res.ToHexString().Should().Be("4e454f3350b51da6bb366be3ea50140cda45ba7df575287c0371000b2037ed3898ff8bf5");
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion tests/neo.UnitTests/UT_ProtocolSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void CheckFirstLetterOfAddresses()
[TestMethod]
public void Default_Network_should_be_mainnet_Network_value()
{
var mainNetNetwork = 0x4F454Eu;
var mainNetNetwork = 0x334F454Eu;
ProtocolSettings.Default.Network.Should().Be(mainNetNetwork);
}

Expand Down