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

merge neo3.0 master #8

Merged
merged 54 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
98e6d1c
Revert "Remove minner tx hole (#934)" (#944)
shargon Jul 22, 2019
00f9c27
Seconds to milliseconds (#918)
vncoelho Jul 22, 2019
d048805
allow CheckWitness to work when using invokescript (#335)
trueinsider Jul 23, 2019
abda789
Allow to configure the memory pool capacity (#948)
shargon Jul 23, 2019
34f37b9
Update dependency: Neo.VM v3.0.0-CI00030 (#956)
erikzhang Jul 25, 2019
a9f46bc
Unit tests for IO, Cryptography, Wallets and VM modules (#943)
eryeer Jul 26, 2019
f4adfac
Script header (#903)
shargon Jul 29, 2019
5c94842
Unit Tests of Crypto Module (#962)
eryeer Jul 29, 2019
2cf1159
Fix `System.Contract.Call`
erikzhang Jul 29, 2019
9e2faf5
Fix ProtocolSettings.cs
erikzhang Jul 29, 2019
547234a
Fixes #946 (#950)
erikzhang Jul 30, 2019
cd99489
Add NEO SDK RPC module (#850)
chenquanyu Jul 30, 2019
46ed67f
Remove `IPolicyPlugin` (#971)
erikzhang Jul 31, 2019
f927dec
Add `Console.WriteLine()` in `ConsensusService.Log()` (#974)
erikzhang Jul 31, 2019
53f7d02
dotnet format (#983)
igormcoelho Aug 2, 2019
30a8997
Fixes `NeoToken.CalculateBonus()` (#992)
erikzhang Aug 4, 2019
aa11720
Small cache changes (#994)
shargon Aug 4, 2019
0a382a9
Fixes `GetRegisteredValidators()` (#991)
erikzhang Aug 5, 2019
48b216c
Fix/travis parallel jobs (#987)
ZhangTao1596 Aug 6, 2019
2ef5d34
Fixes #999
erikzhang Aug 6, 2019
68271a9
Add and update some Unit tests in IO module (#998)
eryeer Aug 7, 2019
a78d474
Fix (#1008)
shargon Aug 8, 2019
2bbcb14
Fix for 1005 (#1006)
shargon Aug 8, 2019
87b7a30
Fix null values during ChangeViewReason (#1016)
belane Aug 10, 2019
5076573
Avoid processing own hashes (3x) (#1009)
vncoelho Aug 11, 2019
1d6ca84
Scoped signatures (#968)
shargon Aug 12, 2019
cf768c6
Improving the use of `RelayCache` on `ProtocolHandler` (#1014)
vncoelho Aug 12, 2019
d959efc
Fix the potential risk to get null CurrentHeaderHash from Blockchain …
yongjiema Aug 16, 2019
1fd9239
Unit Test for Wallets Module (#1018)
eryeer Aug 16, 2019
a705b43
Revert Console.WriteLine (#986)
shargon Aug 19, 2019
e792898
Set max block size (#953)
shargon Aug 20, 2019
7cc961b
GitHub Contribution Guide (#1028)
lock9 Aug 20, 2019
c4d0454
Optimize `GetHeader()` and `GetBlock()` (#1039)
erikzhang Aug 20, 2019
b1a4d29
Update policy - Add maximum witness size (in bytes) (#1020)
shargon Aug 21, 2019
8960dd8
Update VM to last changes (#1048)
shargon Aug 23, 2019
34faf4e
dotnet format (#1054)
igormcoelho Aug 24, 2019
98173cf
Fix consensus problem for proposed blocks with zero transactions (#1053)
shargon Aug 25, 2019
25666ba
Small OnPersist optimization (#1058)
shargon Aug 26, 2019
5995f32
fix crlf on neo.UnitTests and set all files to not use BOM (byte orde…
igormcoelho Aug 27, 2019
68a3a3c
Exposing supported methods used by InteropService (#1060)
lock9 Aug 27, 2019
b9d5511
Remove lines of code (#1062)
shargon Aug 27, 2019
9a0c3f9
Cleaning .editorconfig file (#1067)
vncoelho Aug 28, 2019
22ed3eb
Hide the prefix in the store (#1070)
erikzhang Aug 28, 2019
c04ee5d
Fixes `Transaction.ToJson()` (#1071)
erikzhang Aug 28, 2019
0bd198e
Optimize mempool message (#1068)
shargon Aug 29, 2019
919cc80
Fix Runtime_GetNotifications (#1073)
shargon Aug 29, 2019
93d1d6a
empty scripthash, all notifications (#1074)
igormcoelho Aug 30, 2019
2da4fb1
Issues templates for Bug report and Feature Request (#1034)
lock9 Sep 1, 2019
1a39203
Update NuGets (#1080)
shargon Sep 2, 2019
197a6ec
Downgrade Sqlite to 2.1.4 (#1086)
cloud8little Sep 10, 2019
4e40b12
Fix consensus (#1083)
erikzhang Sep 12, 2019
e1fdde3
v3.0.0-preview1
erikzhang Sep 16, 2019
4ceae9e
C# SDK Add Transaction Manager and Smart Contract APIs (#1026)
chenquanyu Sep 20, 2019
f7e0362
Template fix (#1107)
lock9 Sep 22, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
###############################
# Core EditorConfig Options #
###############################

# dotnet-format requires version 3.1.37601
# dotnet tool update -g dotnet-format
# remember to have: git config --global core.autocrlf false #(which is usually default)

root = true

# Every file

[*]
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
end_of_line = lf
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to detail an error or unexpected behavior
title: ''
labels: ''
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Open the project, run '...'
2. Type '...' or do '...'
3. ...

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Platform:**
- OS: [e.g. Windows 10 x64]
- Version [e.g. neo-cli 2.10.2]

**(Optional) Additional context**
Add any other context about the problem here.

However, if your issue does not fit these aforementioned criteria, or it can be understood in another manner, feel free to open it in a different format.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-or-enhancement-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Feature or enhancement request
about: Suggest an idea for Neo
title: ''
labels: discussion
assignees: ''
---

**Summary**
A summary of the problem you want to solve or metric you want to improve

**Do you have any solution you want to propose?**
A clear and concise description of what you expect with this change.

**Where in the software does this update applies to?**
- Compiler
- Consensus
- CLI
- Plugins
- Ledger
- Network Policy
- P2P (TCP)
- RPC (HTTP)
- SDK
- VM
- Other:

9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Questions
about: Questions about Neo Platform
title: ''
labels: question
assignees: ''
---

**Delete this: We would like to use GitHub for bug reports and feature requests only however if you are unable to get support from our team in: our [Discord](https://discord.io/neo) server or in our [offical documentation](https://docs.neo.org/docs/en-us/index.html), feel encouraged to create an issue here on GitHub.**
Binary file added .github/images/compiler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/consensus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/cosmetic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/discussion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/enhancement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/house-keeping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/ledger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/migration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/network-policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/new-feature.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/p2p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/ready-to-implement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/rpc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/sdk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/solution-design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/to-review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/vm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 25 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,32 @@ osx_image: xcode9.1
mono: none
dotnet: 2.2.300

env:
- TEST_SUITE="without-cultures"
- TEST_SUITE="cultures"

before_install:
- cd neo.UnitTests
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ulimit -n 2048; fi
install:
- dotnet tool install -g dotnet-format --version 4.0.40103 --add-source https://dotnet.myget.org/F/format/api/v3/index.json
- export PATH="$PATH:$HOME/.dotnet/tools"
- dotnet-format --version
before_script:
- echo "Checking format..."
- dotnet format --check --dry-run -w . -v diagnostic # check C# formatting for neo.sln
- cd neo.UnitTests
script: |
dotnet restore
if [[ "$TEST_SUITE" == cultures ]]; then
dotnet test
else
find * -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
dotnet test -v n --filter FullyQualifiedName!=Neo.UnitTests.UT_Culture.All_Tests_Cultures /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
fi
after_success: |
if [[ "$TEST_SUITE" == "without-cultures" ]]; then
echo "Test Success - Branch($TRAVIS_BRANCH) Pull Request($TRAVIS_PULL_REQUEST) Tag($TRAVIS_TAG)"
bash <(curl -s https://codecov.io/bash) -v
fi

script:
- dotnet restore
- find * -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
- dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

after_success:
# After all tests OK, Send CodeDov report
- echo "Test Success - Branch($TRAVIS_BRANCH) Pull Request($TRAVIS_PULL_REQUEST) Tag($TRAVIS_TAG)"
- bash <(curl -s https://codecov.io/bash) -v
82 changes: 82 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

# Contributing to NEO
Neo is an open-source project and it depends on its contributors and constant community feedback to implement the features required for a smart economy. You are more than welcome to join us in the development of Neo.

Read this document to understand how issues are organized and how you can start contributing.

*This document covers this repository only and does not include community repositories or repositories managed by NGD Shanghai and NGD Seattle.*

### Questions and Support
The issue list is reserved exclusively for bug reports and features discussions. If you have questions or need support, please visit us in our [Discord](https://discord.io/neo) server.

### dApp Development
This document does not relate to dApp development. If you are looking to build a dApp using Neo, please [start here](https://neo.org/dev).

### Contributing to open source projects
If you are new to open-source development, please [read here](https://opensource.guide/how-to-contribute/#opening-a-pull-request) how to submit your code.

## Developer Guidance
We try to have as few rules as possible, just enough to keep the project organized:


1. **Discuss before coding**. Proposals must be discussed before being implemented.
Avoid implementing issues with the discussion tag.
2. **Tests during code review**. We expect reviewers to test the issue before approving or requesting changes.

3. **Wait for at least 2 reviews before merging**. Changes can be merged after 2 approvals, for Neo 3.x branch, and 3 approvals for Neo 2.x branch.

3. **Give time to other developers review an issue**. Even if the code has been approved, you should leave at least 24 hours for others to review it before merging the code.

4. **Create unit tests**. It is important that the developer includes basic unit tests so reviewers can test it.

5. **Task assignment**. If a developer wants to work in a specific issue, he may ask the team to assign it to himself. The proposer of an issue has priority in task assignment.


### Issues for beginners
If you are looking to start contributing to NEO, we suggest you start working on issues with ![](./.github/images/cosmetic.png) or ![](./.github/images/house-keeping.png) tags since they usually do not depend on extensive NEO platform knowledge.

### Tags for Issues States

![Discussion](./.github/images/discussion.png) Whenever someone posts a new feature request, the tag discussion is added. This means that there is no consensus if the feature should be implemented or not. Avoid creating PR to solve issues in this state since it may be completely discarded.

![Design](./.github/images/solution-design.png) When a feature request is accepted by the team, but there is no consensus about the implementation, the issue is tagged with design. We recommend the team to agree in the solution design before anyone attempts to implement it, using text or UML. It is not recommended, but developers can also present their solution using code.
Note that PRs for issues in this state may also be discarded if the team disagree with the proposed solution.

![Ready-to-implement](./.github/images/ready-to-implement.png) Once the team has agreed on feature and the proposed solution, the issue is tagged with ready-to-implement. When implementing it, please follow the solution accepted by the team.

### Tags for Issue Types

![Cosmetic](./.github/images/cosmetic.png) Issues with the cosmetic tag are usually changes in code or documentation that improve user experience without affecting current functionality. These issues are recommended for beginners because they require little to no knowledge about Neo platform.

![Enhancement](./.github/images/enhancement.png) Enhancements are platform changes that may affect performance, usability or add new features to existing modules. It is recommended that developers have previous knowledge in the platform to work in these improvements, specially in more complicated modules like the compiler, ledger and consensus.

![Feature](./.github/images/new-feature.png) New features may include large changes in the code base. Some are complex, but some are not. So, a few issues with new-feature may be recommended for starters, specially those related to the rpc and the sdk module.

![Migration](./.github/images/migration.png) Issues related to the migration from Neo 2 to Neo 3 are tagged with migration. These issues are usually the most complicated ones since they require a deep knowledge in both versions.

### Tags for Project Modules
These tags do not necessarily represent each module at code level. Modules consensus and compiler are not recommended for beginners.

![Compiler](./.github/images/compiler.png) Issues that are related or influence the behavior of our C# compiler. Note that the compiler itself is hosted in the [neo-devpack-dotnet](https://github.com/neo-project/neo-devpack-dotnet) repository.

![Consensus](./.github/images/consensus.png) Changes to consensus are usually harder to make and test. Avoid implementing issues in this module that are not yet decided.

![Ledger](./.github/images/ledger.png) The ledger is our 'database', any changes in the way we store information or the data-structures have this tag.

![House-keeping](./.github/images/house-keeping.png) 'Small' enhancements that need to be done in order to keep the project organised and ensure overall quality. These changes may be applied in any place in code, as long as they are small or do not alter current behavior.

![Network-policy](./.github/images/network-policy.png) Identify issues that affect the network-policy like fees, access list or other related issues. Voting may also be related to the network policy module.

![P2P](./.github/images/p2p.png) This module includes peer-to-peer message exchange and network optimisations, at TCP or UDP level (not HTTP).

![RPC](./.github/images/rpc.png) All HTTP communication is handled by the RPC module. This module usually provides support methods since the main communication protocol takes place at the p2p module.

![VM](./.github/images/vm.png) New features that affect the Neo Virtual Machine or the Interop layer.

![SDK](./.github/images/sdk.png) Neo provides an SDK to help developers to interact with the blockchain. Changes in this module must not impact other parts of the software.

![Wallet](./.github/images/wallet.png) Wallets are used to track funds and interact with the blockchain. Note that this module depends on a full node implementation (data stored on local disk).




2 changes: 1 addition & 1 deletion NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<a href="https://codecov.io/github/neo-project/neo/branch/master/graph/badge.svg">
<img src="https://codecov.io/github/neo-project/neo/branch/master/graph/badge.svg" alt="Current Coverage Status." />
</a>
<a href="https://github.com/neo-project/neo">
<img src="https://tokei.rs/b1/github/neo-project/neo?category=lines" alt="Current total lines.">
</a>
<a href="https://github.com/neo-project/neo/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License.">
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using System.Security.Cryptography;
using ECPoint = Neo.Cryptography.ECC.ECPoint;

namespace Neo.UnitTests
namespace Neo.UnitTests.Consensus
{

[TestClass]
Expand Down Expand Up @@ -47,10 +47,10 @@ public void ConsensusService_Primary_Sends_PrepareRequest_After_OnStart()
int timeIndex = 0;
var timeValues = new[] {
//new DateTime(1968, 06, 01, 0, 0, 15, DateTimeKind.Utc), // For tests here
new DateTime(1968, 06, 01, 0, 0, 1, DateTimeKind.Utc), // For receiving block
new DateTime(1968, 06, 01, 0, 0, (int) Blockchain.SecondsPerBlock, DateTimeKind.Utc), // For Initialize
new DateTime(1968, 06, 01, 0, 0, 15, DateTimeKind.Utc), // unused
new DateTime(1968, 06, 01, 0, 0, 15, DateTimeKind.Utc) // unused
new DateTime(1980, 06, 01, 0, 0, 1, 001, DateTimeKind.Utc), // For receiving block
new DateTime(1980, 06, 01, 0, 0, (int) Blockchain.MillisecondsPerBlock / 1000, 100, DateTimeKind.Utc), // For Initialize
new DateTime(1980, 06, 01, 0, 0, 15, 001, DateTimeKind.Utc), // unused
new DateTime(1980, 06, 01, 0, 0, 15, 001, DateTimeKind.Utc) // unused
};
//TimeProvider.Current.UtcNow.ToTimestamp().Should().Be(4244941711); //1968-06-01 00:00:15

Expand All @@ -74,14 +74,14 @@ public void ConsensusService_Primary_Sends_PrepareRequest_After_OnStart()

// Creating proposed block
Header header = new Header();
TestUtils.SetupHeaderWithValues(header, UInt256.Zero, out UInt256 merkRootVal, out UInt160 val160, out uint timestampVal, out uint indexVal, out Witness scriptVal);
header.Size.Should().Be(101);
TestUtils.SetupHeaderWithValues(header, UInt256.Zero, out UInt256 merkRootVal, out UInt160 val160, out ulong timestampVal, out uint indexVal, out Witness scriptVal);
header.Size.Should().Be(105);

Console.WriteLine($"header {header} hash {header.Hash} timstamp {timestampVal}");
Console.WriteLine($"header {header} hash {header.Hash} timestamp {timestampVal}");

timestampVal.Should().Be(4244941696); //1968-06-01 00:00:00
// check basic ConsensusContext
//mockConsensusContext.Object.block_received_time.ToTimestamp().Should().Be(4244941697); //1968-06-01 00:00:01
timestampVal.Should().Be(328665601001); // GMT: Sunday, June 1, 1980 12:00:01.001 AM
// check basic ConsensusContext
//mockConsensusContext.Object.block_received_time.ToTimestamp().Should().Be(4244941697); //1968-06-01 00:00:01

// ============================================================================
// creating ConsensusService actor
Expand Down Expand Up @@ -151,13 +151,13 @@ public void TestSerializeAndDeserializeConsensusContext()
ViewNumber = 2,
Validators = new ECPoint[7]
{
ECPoint.Parse("02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70", Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d", Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e", Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554", Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093", Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c", Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a", Cryptography.ECC.ECCurve.Secp256r1)
ECPoint.Parse("02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70", Neo.Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d", Neo.Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e", Neo.Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554", Neo.Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093", Neo.Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c", Neo.Cryptography.ECC.ECCurve.Secp256r1),
ECPoint.Parse("03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a", Neo.Cryptography.ECC.ECCurve.Secp256r1)
},
MyIndex = -1
};
Expand Down Expand Up @@ -197,7 +197,7 @@ public void TestSerializeAndDeserializeConsensusContext()
consensusContext.CommitPayloads[6] = MakeSignedPayload(consensusContext, new Commit { Signature = sha256.ComputeHash(testTx2.Hash.ToArray()) }, 3, new[] { (byte)'6', (byte)'7' });
}

consensusContext.Block.Timestamp = TimeProvider.Current.UtcNow.ToTimestamp();
consensusContext.Block.Timestamp = TimeProvider.Current.UtcNow.ToTimestampMS();

consensusContext.ChangeViewPayloads = new ConsensusPayload[consensusContext.Validators.Length];
consensusContext.ChangeViewPayloads[0] = MakeSignedPayload(consensusContext, new ChangeView { ViewNumber = 1, Timestamp = 6 }, 0, new[] { (byte)'A' });
Expand Down
Loading