-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Neo Core Style] update smartcontract struct and name #3488
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should also move the namespaces, have some files with the namespace according to the folder, and others don't seems weird
Namespace has being a problem in every core project and almost every file, you can have a seperate pr to focus on that issue if you think it should be fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against the pr, but it changes a public class, so maybe we can also remove some obsolete calls because we will need a new version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No functional changes, but is neo-devpack or other dependent tools affected by this renaming? If so, then I agree with @shargon, some transition period is needed. If no one uses these classes except the core, then it may be merged as is.
The naming is still bad |
@AnnaShaleva @shargon can you please check if the update works. Just add them back but mark as obsolete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
using System.IO; | ||
|
||
namespace Neo.Network.P2P.Payloads | ||
{ | ||
[Obsolete("Use ConflictsAttribute instead")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create an issue to remove this obsolete code. This issue should be included into next release.
@@ -29,7 +31,7 @@ public class NotValidBefore : TransactionAttribute | |||
public override bool AllowMultiple => false; | |||
|
|||
public override int Size => base.Size + | |||
sizeof(uint); // Height. | |||
sizeof(uint); // Height. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may cause by my dotnet format.
using System.IO; | ||
|
||
namespace Neo.Network.P2P.Payloads | ||
{ | ||
[Obsolete("Use ConflictsAttribute instead")] | ||
public class Conflicts : TransactionAttribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before remove maybe is easier to mantain if we share the code
public class Conflicts : TransactionAttribute | |
public class Conflicts : ConflictsAttribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shargon thats what i said here #3488 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before remove maybe is easier to mantain if we share the code
But code is already there, keep this pr this way as much easier isn't it~~~~
Description
Currently different group of files are put together under the network payload and smart contract, making it hard to understand the payload structure. And same files are not named properly, such as
Conflicts
is actuallyConflictAttribute
. Thus having this pr that update the files position to properly group them, and also rename some class to properly reflect its purpose.In this pr, no logic has being changed.
Fixes # (issue)
Type of change
Test Configuration:
Checklist: