From 278a6ec601d785b2c011f0cbb9c65de0f8cafcec Mon Sep 17 00:00:00 2001 From: Ricardo Prado <38396062+lock9@users.noreply.github.com> Date: Sat, 24 Aug 2019 19:42:31 -0300 Subject: [PATCH] Revert "dotnet format (#1054)" This reverts commit 34faf4ed8029203595d767a7840826adc789d71e. --- .../Network/P2P/Payloads/UT_Witness.cs | 2 +- neo.UnitTests/Wallets/NEP6/UT_NEP6Account.cs | 3 +- neo/BigDecimal.cs | 2 +- neo/Consensus/ChangeView.cs | 2 +- neo/Consensus/ChangeViewReason.cs | 2 +- neo/Consensus/Commit.cs | 2 +- neo/Consensus/ConsensusContext.cs | 116 ++++---- neo/Consensus/ConsensusMessage.cs | 2 +- neo/Consensus/ConsensusMessageType.cs | 2 +- neo/Consensus/ConsensusService.cs | 2 +- neo/Consensus/PrepareRequest.cs | 2 +- neo/Consensus/PrepareResponse.cs | 2 +- ...ecoveryMessage.ChangeViewPayloadCompact.cs | 2 +- .../RecoveryMessage.CommitPayloadCompact.cs | 2 +- ...coveryMessage.PreparationPayloadCompact.cs | 2 +- neo/Consensus/RecoveryMessage.cs | 2 +- neo/Consensus/RecoveryRequest.cs | 2 +- neo/Cryptography/Base58.cs | 2 +- neo/Cryptography/BloomFilter.cs | 2 +- neo/Cryptography/Crypto.cs | 2 +- neo/Cryptography/ECC/ECCurve.cs | 2 +- neo/Cryptography/ECC/ECDsa.cs | 2 +- neo/Cryptography/ECC/ECFieldElement.cs | 2 +- neo/Cryptography/ECC/ECPoint.cs | 2 +- neo/Cryptography/Helper.cs | 2 +- neo/Cryptography/MerkleTree.cs | 2 +- neo/Cryptography/MerkleTreeNode.cs | 2 +- neo/Cryptography/Murmur3.cs | 2 +- neo/Cryptography/RIPEMD160Managed.cs | 2 +- neo/Cryptography/SCrypt.cs | 2 +- neo/Helper.cs | 2 +- neo/IO/Actors/Idle.cs | 2 +- neo/IO/Actors/PriorityMailbox.cs | 2 +- neo/IO/Actors/PriorityMessageQueue.cs | 2 +- neo/IO/ByteArrayComparer.cs | 2 +- neo/IO/Caching/Cache.cs | 2 +- neo/IO/Caching/CloneCache.cs | 2 +- neo/IO/Caching/CloneMetaCache.cs | 2 +- neo/IO/Caching/DataCache.cs | 2 +- neo/IO/Caching/FIFOCache.cs | 2 +- neo/IO/Caching/FIFOSet.cs | 130 ++++----- neo/IO/Caching/MetaDataCache.cs | 2 +- neo/IO/Caching/OrderedDictionary.cs | 2 +- neo/IO/Caching/ReflectionCache.cs | 2 +- neo/IO/Caching/ReflectionCacheAttribute.cs | 2 +- neo/IO/Caching/RelayCache.cs | 2 +- neo/IO/Caching/TrackState.cs | 2 +- neo/IO/Data/LevelDB/DB.cs | 2 +- neo/IO/Data/LevelDB/Helper.cs | 2 +- neo/IO/Data/LevelDB/Iterator.cs | 2 +- neo/IO/Data/LevelDB/LevelDBException.cs | 2 +- neo/IO/Data/LevelDB/Native.cs | 2 +- neo/IO/Data/LevelDB/Options.cs | 2 +- neo/IO/Data/LevelDB/ReadOptions.cs | 2 +- neo/IO/Data/LevelDB/Slice.cs | 2 +- neo/IO/Data/LevelDB/SliceBuilder.cs | 2 +- neo/IO/Data/LevelDB/Snapshot.cs | 2 +- neo/IO/Data/LevelDB/WriteBatch.cs | 2 +- neo/IO/Data/LevelDB/WriteOptions.cs | 2 +- neo/IO/Helper.cs | 2 +- neo/IO/ICloneable.cs | 2 +- neo/IO/ISerializable.cs | 2 +- neo/IO/Json/JArray.cs | 2 +- neo/IO/Json/JBoolean.cs | 2 +- neo/IO/Json/JNumber.cs | 2 +- neo/IO/Json/JObject.cs | 2 +- neo/IO/Json/JString.cs | 2 +- neo/IO/Wrappers/SerializableWrapper.cs | 2 +- neo/IO/Wrappers/UInt32Wrapper.cs | 2 +- neo/Ledger/Blockchain.ApplicationExecuted.cs | 2 +- neo/Ledger/Blockchain.cs | 2 +- neo/Ledger/ContractState.cs | 2 +- neo/Ledger/HashIndexState.cs | 2 +- neo/Ledger/HeaderHashList.cs | 2 +- neo/Ledger/RelayResultReason.cs | 2 +- neo/Ledger/StorageFlags.cs | 2 +- neo/Ledger/StorageItem.cs | 2 +- neo/Ledger/StorageKey.cs | 2 +- neo/Ledger/TransactionState.cs | 2 +- neo/Ledger/TrimmedBlock.cs | 2 +- neo/NeoSystem.cs | 2 +- .../P2P/Capabilities/FullNodeCapability.cs | 2 +- .../P2P/Capabilities/NodeCapability.cs | 2 +- .../P2P/Capabilities/NodeCapabilityType.cs | 2 +- .../P2P/Capabilities/ServerCapability.cs | 2 +- neo/Network/P2P/ChannelsConfig.cs | 2 +- neo/Network/P2P/Connection.cs | 2 +- neo/Network/P2P/Helper.cs | 2 +- neo/Network/P2P/LocalNode.cs | 2 +- neo/Network/P2P/Message.cs | 2 +- neo/Network/P2P/MessageCommand.cs | 2 +- neo/Network/P2P/MessageFlags.cs | 2 +- neo/Network/P2P/Payloads/AddrPayload.cs | 2 +- neo/Network/P2P/Payloads/Block.cs | 2 +- neo/Network/P2P/Payloads/BlockBase.cs | 2 +- neo/Network/P2P/Payloads/ConsensusData.cs | 2 +- neo/Network/P2P/Payloads/ConsensusPayload.cs | 2 +- neo/Network/P2P/Payloads/Cosigner.cs | 2 +- neo/Network/P2P/Payloads/FilterAddPayload.cs | 2 +- neo/Network/P2P/Payloads/FilterLoadPayload.cs | 2 +- neo/Network/P2P/Payloads/GetBlocksPayload.cs | 2 +- neo/Network/P2P/Payloads/Header.cs | 2 +- neo/Network/P2P/Payloads/HeadersPayload.cs | 2 +- neo/Network/P2P/Payloads/IInventory.cs | 2 +- neo/Network/P2P/Payloads/IVerifiable.cs | 2 +- neo/Network/P2P/Payloads/InvPayload.cs | 2 +- neo/Network/P2P/Payloads/InventoryType.cs | 2 +- .../P2P/Payloads/MerkleBlockPayload.cs | 2 +- .../P2P/Payloads/NetworkAddressWithTime.cs | 2 +- neo/Network/P2P/Payloads/PingPayload.cs | 2 +- .../P2P/Payloads/TransactionAttribute.cs | 2 +- .../P2P/Payloads/TransactionAttributeUsage.cs | 2 +- neo/Network/P2P/Payloads/VersionPayload.cs | 2 +- neo/Network/P2P/Payloads/Witness.cs | 2 +- neo/Network/P2P/Payloads/WitnessScope.cs | 2 +- neo/Network/P2P/Peer.cs | 2 +- neo/Network/P2P/ProtocolHandler.cs | 2 +- neo/Network/P2P/RemoteNode.cs | 2 +- neo/Network/P2P/TaskManager.cs | 2 +- neo/Network/P2P/TaskSession.cs | 2 +- neo/Network/RPC/Models/RpcBlock.cs | 2 +- neo/Network/RPC/Models/RpcBlockHeader.cs | 2 +- neo/Network/RPC/Models/RpcInvokeResult.cs | 2 +- neo/Network/RPC/Models/RpcNep5Balances.cs | 2 +- neo/Network/RPC/Models/RpcPeers.cs | 2 +- neo/Network/RPC/Models/RpcPlugin.cs | 2 +- neo/Network/RPC/Models/RpcRawMemPool.cs | 2 +- neo/Network/RPC/Models/RpcRequest.cs | 2 +- neo/Network/RPC/Models/RpcResponse.cs | 2 +- neo/Network/RPC/Models/RpcTransaction.cs | 2 +- .../RPC/Models/RpcValidateAddressResult.cs | 2 +- neo/Network/RPC/Models/RpcValidator.cs | 2 +- neo/Network/RPC/Models/RpcVersion.cs | 2 +- neo/Network/RPC/RpcClient.cs | 2 +- neo/Network/RPC/RpcException.cs | 2 +- neo/Persistence/CloneSnapshot.cs | 2 +- neo/Persistence/Helper.cs | 2 +- neo/Persistence/IPersistence.cs | 2 +- neo/Persistence/LevelDB/DbCache.cs | 2 +- neo/Persistence/LevelDB/DbMetaDataCache.cs | 2 +- neo/Persistence/LevelDB/DbSnapshot.cs | 2 +- neo/Persistence/LevelDB/LevelDBStore.cs | 2 +- neo/Persistence/LevelDB/Prefixes.cs | 2 +- neo/Persistence/Snapshot.cs | 2 +- neo/Persistence/Store.cs | 2 +- neo/Plugins/ILogPlugin.cs | 2 +- neo/Plugins/IMemoryPoolTxObserverPlugin.cs | 2 +- neo/Plugins/IP2PPlugin.cs | 2 +- neo/Plugins/IPersistencePlugin.cs | 2 +- neo/Plugins/IRpcPlugin.cs | 2 +- neo/Plugins/LogLevel.cs | 2 +- neo/Plugins/MemoryPoolTxRemovalReason.cs | 2 +- neo/Plugins/Plugin.cs | 2 +- neo/ProtocolSettings.cs | 2 +- .../ApplicationEngine.OpCodePrices.cs | 2 +- neo/SmartContract/ApplicationEngine.cs | 20 +- neo/SmartContract/ContainerPlaceholder.cs | 2 +- neo/SmartContract/Contract.cs | 2 +- neo/SmartContract/ContractParameter.cs | 2 +- neo/SmartContract/ContractParameterType.cs | 2 +- .../ContractParametersContext.cs | 12 +- .../Enumerators/ConcatenatedEnumerator.cs | 2 +- neo/SmartContract/Enumerators/IEnumerator.cs | 2 +- .../Enumerators/IteratorKeysWrapper.cs | 2 +- .../Enumerators/IteratorValuesWrapper.cs | 2 +- neo/SmartContract/ExecutionContextState.cs | 18 +- neo/SmartContract/Helper.cs | 2 +- neo/SmartContract/InteropDescriptor.cs | 2 +- neo/SmartContract/InteropService.NEO.cs | 2 +- neo/SmartContract/InteropService.cs | 2 +- neo/SmartContract/Iterators/ArrayWrapper.cs | 2 +- neo/SmartContract/Iterators/IIterator.cs | 2 +- neo/SmartContract/Iterators/MapWrapper.cs | 2 +- .../Iterators/StorageIterator.cs | 2 +- neo/SmartContract/JsonSerializer.cs | 2 +- neo/SmartContract/LogEventArgs.cs | 2 +- neo/SmartContract/Manifest/ContractAbi.cs | 2 +- .../Manifest/ContractEventDescriptor.cs | 2 +- .../Manifest/ContractFeatures.cs | 2 +- neo/SmartContract/Manifest/ContractGroup.cs | 2 +- .../Manifest/ContractManifest.cs | 2 +- .../Manifest/ContractMethodDescriptor.cs | 2 +- .../Manifest/ContractParameterDefinition.cs | 2 +- .../Manifest/ContractPermission.cs | 2 +- .../Manifest/ContractPermissionDescriptor.cs | 2 +- .../Manifest/WildCardContainer.cs | 2 +- .../Native/ContractMethodAttribute.cs | 2 +- .../Native/ContractMethodMetadata.cs | 2 +- neo/SmartContract/Native/NativeContract.cs | 2 +- neo/SmartContract/Native/PolicyContract.cs | 2 +- neo/SmartContract/Native/Tokens/GasToken.cs | 2 +- .../Native/Tokens/Nep5AccountState.cs | 2 +- neo/SmartContract/Native/Tokens/Nep5Token.cs | 2 +- neo/SmartContract/NefFile.cs | 258 +++++++++--------- neo/SmartContract/NotifyEventArgs.cs | 2 +- neo/SmartContract/StackItemType.cs | 2 +- neo/SmartContract/StorageContext.cs | 2 +- neo/SmartContract/WitnessWrapper.cs | 2 +- neo/UInt160.cs | 2 +- neo/UInt256.cs | 2 +- neo/UIntBase.cs | 2 +- neo/VM/Helper.cs | 2 +- neo/Wallets/AssetDescriptor.cs | 2 +- neo/Wallets/Helper.cs | 2 +- neo/Wallets/KeyPair.cs | 2 +- neo/Wallets/NEP6/NEP6Account.cs | 2 +- neo/Wallets/NEP6/NEP6Contract.cs | 2 +- neo/Wallets/NEP6/NEP6Wallet.cs | 2 +- neo/Wallets/NEP6/ScryptParameters.cs | 2 +- neo/Wallets/NEP6/WalletLocker.cs | 2 +- neo/Wallets/SQLite/Account.cs | 2 +- neo/Wallets/SQLite/Address.cs | 2 +- neo/Wallets/SQLite/Contract.cs | 2 +- neo/Wallets/SQLite/Key.cs | 2 +- neo/Wallets/SQLite/UserWallet.cs | 2 +- neo/Wallets/SQLite/UserWalletAccount.cs | 2 +- neo/Wallets/SQLite/VerificationContract.cs | 2 +- neo/Wallets/SQLite/WalletDataContext.cs | 2 +- neo/Wallets/TransferOutput.cs | 2 +- neo/Wallets/Wallet.cs | 2 +- neo/Wallets/WalletAccount.cs | 2 +- neo/neo.csproj | 2 +- 222 files changed, 493 insertions(+), 494 deletions(-) diff --git a/neo.UnitTests/Network/P2P/Payloads/UT_Witness.cs b/neo.UnitTests/Network/P2P/Payloads/UT_Witness.cs index efb06d93be..01a76eeee4 100644 --- a/neo.UnitTests/Network/P2P/Payloads/UT_Witness.cs +++ b/neo.UnitTests/Network/P2P/Payloads/UT_Witness.cs @@ -122,7 +122,7 @@ public void MaxSize_OK() witness.Size.Should().Be(1003); witness.InvocationScript.GetVarSize().Should().Be(653); witness.VerificationScript.GetVarSize().Should().Be(350); - + Assert.IsTrue(witness.Size <= 1024); var copy = witness.ToArray().AsSerializable(); diff --git a/neo.UnitTests/Wallets/NEP6/UT_NEP6Account.cs b/neo.UnitTests/Wallets/NEP6/UT_NEP6Account.cs index ade2472ba8..c531c8c138 100644 --- a/neo.UnitTests/Wallets/NEP6/UT_NEP6Account.cs +++ b/neo.UnitTests/Wallets/NEP6/UT_NEP6Account.cs @@ -18,8 +18,7 @@ public class UT_NEP6Account private static KeyPair keyPair; [ClassInitialize] - public static void ClassSetup(TestContext context) - { + public static void ClassSetup(TestContext context) { byte[] privateKey = { 0x01,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}; keyPair = new KeyPair(privateKey); diff --git a/neo/BigDecimal.cs b/neo/BigDecimal.cs index aaf541caa9..1d65859b0f 100644 --- a/neo/BigDecimal.cs +++ b/neo/BigDecimal.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Numerics; namespace Neo diff --git a/neo/Consensus/ChangeView.cs b/neo/Consensus/ChangeView.cs index 607e44cfd5..4c18b3fb3f 100644 --- a/neo/Consensus/ChangeView.cs +++ b/neo/Consensus/ChangeView.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace Neo.Consensus { diff --git a/neo/Consensus/ChangeViewReason.cs b/neo/Consensus/ChangeViewReason.cs index 066ecc1085..eb06b7494a 100644 --- a/neo/Consensus/ChangeViewReason.cs +++ b/neo/Consensus/ChangeViewReason.cs @@ -1,4 +1,4 @@ -namespace Neo.Consensus +namespace Neo.Consensus { public enum ChangeViewReason : byte { diff --git a/neo/Consensus/Commit.cs b/neo/Consensus/Commit.cs index 84585e1ee4..f7c17e559a 100644 --- a/neo/Consensus/Commit.cs +++ b/neo/Consensus/Commit.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace Neo.Consensus { diff --git a/neo/Consensus/ConsensusContext.cs b/neo/Consensus/ConsensusContext.cs index fbb21d8cd7..a06c6c965b 100644 --- a/neo/Consensus/ConsensusContext.cs +++ b/neo/Consensus/ConsensusContext.cs @@ -6,7 +6,7 @@ using Neo.Persistence; using Neo.SmartContract; using Neo.SmartContract.Native; -using Neo.VM; +using Neo.VM; using Neo.Wallets; using System; using System.Collections.Generic; @@ -39,11 +39,11 @@ internal class ConsensusContext : IDisposable, ISerializable public Snapshot Snapshot { get; private set; } private KeyPair keyPair; - private int _witnessSize; + private int _witnessSize; private readonly Wallet wallet; private readonly Store store; private readonly Random random = new Random(); - + public int F => (Validators.Length - 1) / 3; public int M => Validators.Length - F; public bool IsPrimary => MyIndex == Block.ConsensusData.PrimaryIndex; @@ -205,40 +205,40 @@ private void SignPayload(ConsensusPayload payload) return; } payload.Witness = sc.GetWitnesses()[0]; - } - + } + /// /// Return the expected block size /// - internal int GetExpectedBlockSize() - { - return GetExpectedBlockSizeWithoutTransactions(Transactions.Count) + // Base size - Transactions.Values.Sum(u => u.Size); // Sum Txs + internal int GetExpectedBlockSize() + { + return GetExpectedBlockSizeWithoutTransactions(Transactions.Count) + // Base size + Transactions.Values.Sum(u => u.Size); // Sum Txs } - /// - /// Return the expected block size without txs - /// - /// Expected transactions - internal int GetExpectedBlockSizeWithoutTransactions(int expectedTransactions) - { - var blockSize = - // BlockBase - sizeof(uint) + //Version - UInt256.Length + //PrevHash - UInt256.Length + //MerkleRoot - sizeof(ulong) + //Timestamp - sizeof(uint) + //Index - UInt160.Length + //NextConsensus - 1 + // - _witnessSize; //Witness - - blockSize += - // Block - Block.ConsensusData.Size + //ConsensusData - IO.Helper.GetVarSize(expectedTransactions + 1); //Transactions count - - return blockSize; + /// + /// Return the expected block size without txs + /// + /// Expected transactions + internal int GetExpectedBlockSizeWithoutTransactions(int expectedTransactions) + { + var blockSize = + // BlockBase + sizeof(uint) + //Version + UInt256.Length + //PrevHash + UInt256.Length + //MerkleRoot + sizeof(ulong) + //Timestamp + sizeof(uint) + //Index + UInt160.Length + //NextConsensus + 1 + // + _witnessSize; //Witness + + blockSize += + // Block + Block.ConsensusData.Size + //ConsensusData + IO.Helper.GetVarSize(expectedTransactions + 1); //Transactions count + + return blockSize; } /// @@ -247,18 +247,18 @@ internal int GetExpectedBlockSizeWithoutTransactions(int expectedTransactions) /// Ordered transactions internal void EnsureMaxBlockSize(IEnumerable txs) { - uint maxBlockSize = NativeContract.Policy.GetMaxBlockSize(Snapshot); - uint maxTransactionsPerBlock = NativeContract.Policy.GetMaxTransactionsPerBlock(Snapshot); + uint maxBlockSize = NativeContract.Policy.GetMaxBlockSize(Snapshot); + uint maxTransactionsPerBlock = NativeContract.Policy.GetMaxTransactionsPerBlock(Snapshot); // Limit Speaker proposal to the limit `MaxTransactionsPerBlock` or all available transactions of the mempool txs = txs.Take((int)maxTransactionsPerBlock); List hashes = new List(); Transactions = new Dictionary(); - Block.Transactions = new Transaction[0]; - - // We need to know the expected block size - - var blockSize = GetExpectedBlockSizeWithoutTransactions(txs.Count()); + Block.Transactions = new Transaction[0]; + + // We need to know the expected block size + + var blockSize = GetExpectedBlockSizeWithoutTransactions(txs.Count()); // Iterate transaction until reach the size @@ -271,8 +271,8 @@ internal void EnsureMaxBlockSize(IEnumerable txs) hashes.Add(tx.Hash); Transactions.Add(tx.Hash, tx); } - - TransactionHashes = hashes.ToArray(); + + TransactionHashes = hashes.ToArray(); } public ConsensusPayload MakePrepareRequest() @@ -281,8 +281,8 @@ public ConsensusPayload MakePrepareRequest() random.NextBytes(buffer); Block.ConsensusData.Nonce = BitConverter.ToUInt64(buffer, 0); EnsureMaxBlockSize(Blockchain.Singleton.MemPool.GetSortedVerifiedTransactions()); - Block.Timestamp = Math.Max(TimeProvider.Current.UtcNow.ToTimestampMS(), PrevHeader.Timestamp + 1); - + Block.Timestamp = Math.Max(TimeProvider.Current.UtcNow.ToTimestampMS(), PrevHeader.Timestamp + 1); + return PreparationPayloads[MyIndex] = MakeSignedPayload(new PrepareRequest { Timestamp = Block.Timestamp, @@ -348,21 +348,21 @@ public void Reset(byte viewNumber) }; var pv = Validators; Validators = NativeContract.NEO.GetNextBlockValidators(Snapshot); - if (_witnessSize == 0 || (pv != null && pv.Length != Validators.Length)) - { - // Compute the expected size of the witness - using (ScriptBuilder sb = new ScriptBuilder()) - { - for (int x = 0; x < M; x++) - { - sb.EmitPush(new byte[64]); - } - _witnessSize = new Witness - { - InvocationScript = sb.ToArray(), - VerificationScript = Contract.CreateMultiSigRedeemScript(M, Validators) - }.Size; - } + if (_witnessSize == 0 || (pv != null && pv.Length != Validators.Length)) + { + // Compute the expected size of the witness + using (ScriptBuilder sb = new ScriptBuilder()) + { + for (int x = 0; x < M; x++) + { + sb.EmitPush(new byte[64]); + } + _witnessSize = new Witness + { + InvocationScript = sb.ToArray(), + VerificationScript = Contract.CreateMultiSigRedeemScript(M, Validators) + }.Size; + } } MyIndex = -1; ChangeViewPayloads = new ConsensusPayload[Validators.Length]; diff --git a/neo/Consensus/ConsensusMessage.cs b/neo/Consensus/ConsensusMessage.cs index af16db03e3..85bf3174e5 100644 --- a/neo/Consensus/ConsensusMessage.cs +++ b/neo/Consensus/ConsensusMessage.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.IO.Caching; using System; using System.IO; diff --git a/neo/Consensus/ConsensusMessageType.cs b/neo/Consensus/ConsensusMessageType.cs index fe13207db1..0aff263595 100644 --- a/neo/Consensus/ConsensusMessageType.cs +++ b/neo/Consensus/ConsensusMessageType.cs @@ -1,4 +1,4 @@ -using Neo.IO.Caching; +using Neo.IO.Caching; namespace Neo.Consensus { diff --git a/neo/Consensus/ConsensusService.cs b/neo/Consensus/ConsensusService.cs index cac657c95f..ee5c91d635 100644 --- a/neo/Consensus/ConsensusService.cs +++ b/neo/Consensus/ConsensusService.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.Configuration; using Neo.Cryptography; using Neo.IO; diff --git a/neo/Consensus/PrepareRequest.cs b/neo/Consensus/PrepareRequest.cs index 2369b4f9f7..85823fe957 100644 --- a/neo/Consensus/PrepareRequest.cs +++ b/neo/Consensus/PrepareRequest.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Network.P2P.Payloads; using System; using System.IO; diff --git a/neo/Consensus/PrepareResponse.cs b/neo/Consensus/PrepareResponse.cs index 7c2956ccc2..93eb95833a 100644 --- a/neo/Consensus/PrepareResponse.cs +++ b/neo/Consensus/PrepareResponse.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System.IO; namespace Neo.Consensus diff --git a/neo/Consensus/RecoveryMessage.ChangeViewPayloadCompact.cs b/neo/Consensus/RecoveryMessage.ChangeViewPayloadCompact.cs index dfc46385c0..6d4d6a7ae2 100644 --- a/neo/Consensus/RecoveryMessage.ChangeViewPayloadCompact.cs +++ b/neo/Consensus/RecoveryMessage.ChangeViewPayloadCompact.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Network.P2P.Payloads; using System.IO; diff --git a/neo/Consensus/RecoveryMessage.CommitPayloadCompact.cs b/neo/Consensus/RecoveryMessage.CommitPayloadCompact.cs index 72962f92b3..d9347b71bc 100644 --- a/neo/Consensus/RecoveryMessage.CommitPayloadCompact.cs +++ b/neo/Consensus/RecoveryMessage.CommitPayloadCompact.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Network.P2P.Payloads; using System.IO; diff --git a/neo/Consensus/RecoveryMessage.PreparationPayloadCompact.cs b/neo/Consensus/RecoveryMessage.PreparationPayloadCompact.cs index 962ae69185..8c0e52f59f 100644 --- a/neo/Consensus/RecoveryMessage.PreparationPayloadCompact.cs +++ b/neo/Consensus/RecoveryMessage.PreparationPayloadCompact.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Network.P2P.Payloads; using System.IO; diff --git a/neo/Consensus/RecoveryMessage.cs b/neo/Consensus/RecoveryMessage.cs index a5e1c09ac6..afae45470b 100644 --- a/neo/Consensus/RecoveryMessage.cs +++ b/neo/Consensus/RecoveryMessage.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Ledger; using Neo.Network.P2P.Payloads; using Neo.SmartContract; diff --git a/neo/Consensus/RecoveryRequest.cs b/neo/Consensus/RecoveryRequest.cs index 6ea0d7c2f7..c02ceb176c 100644 --- a/neo/Consensus/RecoveryRequest.cs +++ b/neo/Consensus/RecoveryRequest.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace Neo.Consensus { diff --git a/neo/Cryptography/Base58.cs b/neo/Cryptography/Base58.cs index b64f12216b..fd5bf4d432 100644 --- a/neo/Cryptography/Base58.cs +++ b/neo/Cryptography/Base58.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Numerics; using System.Text; diff --git a/neo/Cryptography/BloomFilter.cs b/neo/Cryptography/BloomFilter.cs index c4b79d01f2..637cd9fac5 100644 --- a/neo/Cryptography/BloomFilter.cs +++ b/neo/Cryptography/BloomFilter.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using System.Linq; namespace Neo.Cryptography diff --git a/neo/Cryptography/Crypto.cs b/neo/Cryptography/Crypto.cs index c835e3eebb..ae1c8cd168 100644 --- a/neo/Cryptography/Crypto.cs +++ b/neo/Cryptography/Crypto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Security.Cryptography; diff --git a/neo/Cryptography/ECC/ECCurve.cs b/neo/Cryptography/ECC/ECCurve.cs index 45d70d31f4..9d43bcd25f 100644 --- a/neo/Cryptography/ECC/ECCurve.cs +++ b/neo/Cryptography/ECC/ECCurve.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Numerics; namespace Neo.Cryptography.ECC diff --git a/neo/Cryptography/ECC/ECDsa.cs b/neo/Cryptography/ECC/ECDsa.cs index 07373a7844..a254b4248e 100644 --- a/neo/Cryptography/ECC/ECDsa.cs +++ b/neo/Cryptography/ECC/ECDsa.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Numerics; using System.Security.Cryptography; diff --git a/neo/Cryptography/ECC/ECFieldElement.cs b/neo/Cryptography/ECC/ECFieldElement.cs index 331e1e4408..e33cab4206 100644 --- a/neo/Cryptography/ECC/ECFieldElement.cs +++ b/neo/Cryptography/ECC/ECFieldElement.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Numerics; diff --git a/neo/Cryptography/ECC/ECPoint.cs b/neo/Cryptography/ECC/ECPoint.cs index 803aab9987..dbd556eb50 100644 --- a/neo/Cryptography/ECC/ECPoint.cs +++ b/neo/Cryptography/ECC/ECPoint.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System; using System.IO; using System.Linq; diff --git a/neo/Cryptography/Helper.cs b/neo/Cryptography/Helper.cs index 07c9ce74e9..ff1bb8d3d7 100644 --- a/neo/Cryptography/Helper.cs +++ b/neo/Cryptography/Helper.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Network.P2P.Payloads; using System; using System.Collections.Generic; diff --git a/neo/Cryptography/MerkleTree.cs b/neo/Cryptography/MerkleTree.cs index 0d8e617f3f..8d73f56a23 100644 --- a/neo/Cryptography/MerkleTree.cs +++ b/neo/Cryptography/MerkleTree.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; diff --git a/neo/Cryptography/MerkleTreeNode.cs b/neo/Cryptography/MerkleTreeNode.cs index 73b84b43e9..6bfc75c8d1 100644 --- a/neo/Cryptography/MerkleTreeNode.cs +++ b/neo/Cryptography/MerkleTreeNode.cs @@ -1,4 +1,4 @@ -namespace Neo.Cryptography +namespace Neo.Cryptography { internal class MerkleTreeNode { diff --git a/neo/Cryptography/Murmur3.cs b/neo/Cryptography/Murmur3.cs index 6296bb20be..e54c19ebc1 100644 --- a/neo/Cryptography/Murmur3.cs +++ b/neo/Cryptography/Murmur3.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.CompilerServices; using System.Security.Cryptography; diff --git a/neo/Cryptography/RIPEMD160Managed.cs b/neo/Cryptography/RIPEMD160Managed.cs index 22ffafb835..898780dc47 100644 --- a/neo/Cryptography/RIPEMD160Managed.cs +++ b/neo/Cryptography/RIPEMD160Managed.cs @@ -1,4 +1,4 @@ -#if !NET47 +#if !NET47 using System; using System.Runtime.InteropServices; using System.Security; diff --git a/neo/Cryptography/SCrypt.cs b/neo/Cryptography/SCrypt.cs index e40c2c83c5..3022af296c 100644 --- a/neo/Cryptography/SCrypt.cs +++ b/neo/Cryptography/SCrypt.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Security.Cryptography; namespace Neo.Cryptography diff --git a/neo/Helper.cs b/neo/Helper.cs index 1a513ec79e..d8409b64bd 100644 --- a/neo/Helper.cs +++ b/neo/Helper.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; using Neo.Plugins; using System; using System.Collections.Generic; diff --git a/neo/IO/Actors/Idle.cs b/neo/IO/Actors/Idle.cs index bd4a2d05fa..4bb8655bd8 100644 --- a/neo/IO/Actors/Idle.cs +++ b/neo/IO/Actors/Idle.cs @@ -1,4 +1,4 @@ -namespace Neo.IO.Actors +namespace Neo.IO.Actors { internal sealed class Idle { diff --git a/neo/IO/Actors/PriorityMailbox.cs b/neo/IO/Actors/PriorityMailbox.cs index 31a50c9a89..c6c8a8fbe2 100644 --- a/neo/IO/Actors/PriorityMailbox.cs +++ b/neo/IO/Actors/PriorityMailbox.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.Configuration; using Akka.Dispatch; using Akka.Dispatch.MessageQueues; diff --git a/neo/IO/Actors/PriorityMessageQueue.cs b/neo/IO/Actors/PriorityMessageQueue.cs index b7820b065a..d22f7626fe 100644 --- a/neo/IO/Actors/PriorityMessageQueue.cs +++ b/neo/IO/Actors/PriorityMessageQueue.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.Dispatch; using Akka.Dispatch.MessageQueues; using System; diff --git a/neo/IO/ByteArrayComparer.cs b/neo/IO/ByteArrayComparer.cs index 478c6e3c7d..956ab758e6 100644 --- a/neo/IO/ByteArrayComparer.cs +++ b/neo/IO/ByteArrayComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; namespace Neo.IO diff --git a/neo/IO/Caching/Cache.cs b/neo/IO/Caching/Cache.cs index b5095231f3..5b97d3a223 100644 --- a/neo/IO/Caching/Cache.cs +++ b/neo/IO/Caching/Cache.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; diff --git a/neo/IO/Caching/CloneCache.cs b/neo/IO/Caching/CloneCache.cs index 0dd030fcb6..f13865a41b 100644 --- a/neo/IO/Caching/CloneCache.cs +++ b/neo/IO/Caching/CloneCache.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; namespace Neo.IO.Caching diff --git a/neo/IO/Caching/CloneMetaCache.cs b/neo/IO/Caching/CloneMetaCache.cs index 3cb0d83201..6b354e256e 100644 --- a/neo/IO/Caching/CloneMetaCache.cs +++ b/neo/IO/Caching/CloneMetaCache.cs @@ -1,4 +1,4 @@ -namespace Neo.IO.Caching +namespace Neo.IO.Caching { internal class CloneMetaCache : MetaDataCache where T : class, ICloneable, ISerializable, new() diff --git a/neo/IO/Caching/DataCache.cs b/neo/IO/Caching/DataCache.cs index dc97031d10..278c01d650 100644 --- a/neo/IO/Caching/DataCache.cs +++ b/neo/IO/Caching/DataCache.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; diff --git a/neo/IO/Caching/FIFOCache.cs b/neo/IO/Caching/FIFOCache.cs index c96b11bf6e..4aa7198b50 100644 --- a/neo/IO/Caching/FIFOCache.cs +++ b/neo/IO/Caching/FIFOCache.cs @@ -1,4 +1,4 @@ -namespace Neo.IO.Caching +namespace Neo.IO.Caching { internal abstract class FIFOCache : Cache { diff --git a/neo/IO/Caching/FIFOSet.cs b/neo/IO/Caching/FIFOSet.cs index 98733ce444..aba54463ae 100644 --- a/neo/IO/Caching/FIFOSet.cs +++ b/neo/IO/Caching/FIFOSet.cs @@ -1,65 +1,65 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Linq; - -namespace Neo.IO.Caching -{ - internal class FIFOSet : IEnumerable where T : IEquatable - { - private readonly int maxCapacity; - private readonly int removeCount; - private readonly OrderedDictionary dictionary; - - public FIFOSet(int maxCapacity, decimal batchSize = 0.1m) - { - if (maxCapacity <= 0) throw new ArgumentOutOfRangeException(nameof(maxCapacity)); - if (batchSize <= 0 || batchSize > 1) throw new ArgumentOutOfRangeException(nameof(batchSize)); - - this.maxCapacity = maxCapacity; - this.removeCount = Math.Max((int)(maxCapacity * batchSize), 1); - this.dictionary = new OrderedDictionary(maxCapacity); - } - - public bool Add(T item) - { - if (dictionary.Contains(item)) return false; - if (dictionary.Count >= maxCapacity) - { - if (removeCount == maxCapacity) - { - dictionary.Clear(); - } - else - { - for (int i = 0; i < removeCount; i++) - dictionary.RemoveAt(0); - } - } - dictionary.Add(item, null); - return true; - } - - public bool Contains(T item) - { - return dictionary.Contains(item); - } - - public void ExceptWith(IEnumerable hashes) - { - foreach (var hash in hashes) - { - dictionary.Remove(hash); - } - } - - public IEnumerator GetEnumerator() - { - var entries = dictionary.Keys.Cast().ToArray(); - foreach (var entry in entries) yield return entry; - } - - IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Linq; + +namespace Neo.IO.Caching +{ + internal class FIFOSet : IEnumerable where T : IEquatable + { + private readonly int maxCapacity; + private readonly int removeCount; + private readonly OrderedDictionary dictionary; + + public FIFOSet(int maxCapacity, decimal batchSize = 0.1m) + { + if (maxCapacity <= 0) throw new ArgumentOutOfRangeException(nameof(maxCapacity)); + if (batchSize <= 0 || batchSize > 1) throw new ArgumentOutOfRangeException(nameof(batchSize)); + + this.maxCapacity = maxCapacity; + this.removeCount = Math.Max((int)(maxCapacity * batchSize), 1); + this.dictionary = new OrderedDictionary(maxCapacity); + } + + public bool Add(T item) + { + if (dictionary.Contains(item)) return false; + if (dictionary.Count >= maxCapacity) + { + if (removeCount == maxCapacity) + { + dictionary.Clear(); + } + else + { + for (int i = 0; i < removeCount; i++) + dictionary.RemoveAt(0); + } + } + dictionary.Add(item, null); + return true; + } + + public bool Contains(T item) + { + return dictionary.Contains(item); + } + + public void ExceptWith(IEnumerable hashes) + { + foreach (var hash in hashes) + { + dictionary.Remove(hash); + } + } + + public IEnumerator GetEnumerator() + { + var entries = dictionary.Keys.Cast().ToArray(); + foreach (var entry in entries) yield return entry; + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + } +} diff --git a/neo/IO/Caching/MetaDataCache.cs b/neo/IO/Caching/MetaDataCache.cs index f0c40cc59a..fa3fed6215 100644 --- a/neo/IO/Caching/MetaDataCache.cs +++ b/neo/IO/Caching/MetaDataCache.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Caching { diff --git a/neo/IO/Caching/OrderedDictionary.cs b/neo/IO/Caching/OrderedDictionary.cs index efc85b6305..bf12785406 100644 --- a/neo/IO/Caching/OrderedDictionary.cs +++ b/neo/IO/Caching/OrderedDictionary.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; diff --git a/neo/IO/Caching/ReflectionCache.cs b/neo/IO/Caching/ReflectionCache.cs index 705366e2fb..800561c6d9 100644 --- a/neo/IO/Caching/ReflectionCache.cs +++ b/neo/IO/Caching/ReflectionCache.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; diff --git a/neo/IO/Caching/ReflectionCacheAttribute.cs b/neo/IO/Caching/ReflectionCacheAttribute.cs index ba5fd4e1bc..e1c1200278 100644 --- a/neo/IO/Caching/ReflectionCacheAttribute.cs +++ b/neo/IO/Caching/ReflectionCacheAttribute.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Caching { diff --git a/neo/IO/Caching/RelayCache.cs b/neo/IO/Caching/RelayCache.cs index 0bc2884eda..ec6e35bdce 100644 --- a/neo/IO/Caching/RelayCache.cs +++ b/neo/IO/Caching/RelayCache.cs @@ -1,4 +1,4 @@ -using Neo.Network.P2P.Payloads; +using Neo.Network.P2P.Payloads; namespace Neo.IO.Caching { diff --git a/neo/IO/Caching/TrackState.cs b/neo/IO/Caching/TrackState.cs index cba7daec0c..aa144aab34 100644 --- a/neo/IO/Caching/TrackState.cs +++ b/neo/IO/Caching/TrackState.cs @@ -1,4 +1,4 @@ -namespace Neo.IO.Caching +namespace Neo.IO.Caching { public enum TrackState : byte { diff --git a/neo/IO/Data/LevelDB/DB.cs b/neo/IO/Data/LevelDB/DB.cs index 04e8f50e8f..559a109594 100644 --- a/neo/IO/Data/LevelDB/DB.cs +++ b/neo/IO/Data/LevelDB/DB.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Data.LevelDB { diff --git a/neo/IO/Data/LevelDB/Helper.cs b/neo/IO/Data/LevelDB/Helper.cs index d4c451f574..2b58690db0 100644 --- a/neo/IO/Data/LevelDB/Helper.cs +++ b/neo/IO/Data/LevelDB/Helper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; diff --git a/neo/IO/Data/LevelDB/Iterator.cs b/neo/IO/Data/LevelDB/Iterator.cs index b3a6a0bfe0..11e72faf63 100644 --- a/neo/IO/Data/LevelDB/Iterator.cs +++ b/neo/IO/Data/LevelDB/Iterator.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Data.LevelDB { diff --git a/neo/IO/Data/LevelDB/LevelDBException.cs b/neo/IO/Data/LevelDB/LevelDBException.cs index 8804f1f7f2..0fa0578c56 100644 --- a/neo/IO/Data/LevelDB/LevelDBException.cs +++ b/neo/IO/Data/LevelDB/LevelDBException.cs @@ -1,4 +1,4 @@ -using System.Data.Common; +using System.Data.Common; namespace Neo.IO.Data.LevelDB { diff --git a/neo/IO/Data/LevelDB/Native.cs b/neo/IO/Data/LevelDB/Native.cs index 6a19ef4cfe..fc3ccd6387 100644 --- a/neo/IO/Data/LevelDB/Native.cs +++ b/neo/IO/Data/LevelDB/Native.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Runtime.InteropServices; diff --git a/neo/IO/Data/LevelDB/Options.cs b/neo/IO/Data/LevelDB/Options.cs index 53dd6e488b..676627cb08 100644 --- a/neo/IO/Data/LevelDB/Options.cs +++ b/neo/IO/Data/LevelDB/Options.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Data.LevelDB { diff --git a/neo/IO/Data/LevelDB/ReadOptions.cs b/neo/IO/Data/LevelDB/ReadOptions.cs index 9c198cfba1..d27f0d7b59 100644 --- a/neo/IO/Data/LevelDB/ReadOptions.cs +++ b/neo/IO/Data/LevelDB/ReadOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Data.LevelDB { diff --git a/neo/IO/Data/LevelDB/Slice.cs b/neo/IO/Data/LevelDB/Slice.cs index 1f9d927783..95da8c6a44 100644 --- a/neo/IO/Data/LevelDB/Slice.cs +++ b/neo/IO/Data/LevelDB/Slice.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using System; using System.Linq; using System.Runtime.InteropServices; diff --git a/neo/IO/Data/LevelDB/SliceBuilder.cs b/neo/IO/Data/LevelDB/SliceBuilder.cs index d5888c6b5e..f00ce20454 100644 --- a/neo/IO/Data/LevelDB/SliceBuilder.cs +++ b/neo/IO/Data/LevelDB/SliceBuilder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; diff --git a/neo/IO/Data/LevelDB/Snapshot.cs b/neo/IO/Data/LevelDB/Snapshot.cs index d651098388..89a89cb55a 100644 --- a/neo/IO/Data/LevelDB/Snapshot.cs +++ b/neo/IO/Data/LevelDB/Snapshot.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Data.LevelDB { diff --git a/neo/IO/Data/LevelDB/WriteBatch.cs b/neo/IO/Data/LevelDB/WriteBatch.cs index b3a9782108..eaa3e08bd6 100644 --- a/neo/IO/Data/LevelDB/WriteBatch.cs +++ b/neo/IO/Data/LevelDB/WriteBatch.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Data.LevelDB { diff --git a/neo/IO/Data/LevelDB/WriteOptions.cs b/neo/IO/Data/LevelDB/WriteOptions.cs index 8d120c3997..8a74fb5340 100644 --- a/neo/IO/Data/LevelDB/WriteOptions.cs +++ b/neo/IO/Data/LevelDB/WriteOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.IO.Data.LevelDB { diff --git a/neo/IO/Helper.cs b/neo/IO/Helper.cs index c985e676b2..a306e297d5 100644 --- a/neo/IO/Helper.cs +++ b/neo/IO/Helper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/neo/IO/ICloneable.cs b/neo/IO/ICloneable.cs index 83b4d77725..4df61c84b8 100644 --- a/neo/IO/ICloneable.cs +++ b/neo/IO/ICloneable.cs @@ -1,4 +1,4 @@ -namespace Neo.IO +namespace Neo.IO { public interface ICloneable { diff --git a/neo/IO/ISerializable.cs b/neo/IO/ISerializable.cs index d03540deb2..28f1ec3e01 100644 --- a/neo/IO/ISerializable.cs +++ b/neo/IO/ISerializable.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace Neo.IO { diff --git a/neo/IO/Json/JArray.cs b/neo/IO/Json/JArray.cs index 6de623d29a..3109b3b61c 100644 --- a/neo/IO/Json/JArray.cs +++ b/neo/IO/Json/JArray.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.IO; diff --git a/neo/IO/Json/JBoolean.cs b/neo/IO/Json/JBoolean.cs index 6b7c7a34c4..83a9111422 100644 --- a/neo/IO/Json/JBoolean.cs +++ b/neo/IO/Json/JBoolean.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace Neo.IO.Json diff --git a/neo/IO/Json/JNumber.cs b/neo/IO/Json/JNumber.cs index daac440094..2a23dc3157 100644 --- a/neo/IO/Json/JNumber.cs +++ b/neo/IO/Json/JNumber.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Text; diff --git a/neo/IO/Json/JObject.cs b/neo/IO/Json/JObject.cs index cf6f68cbc7..40aa18f5da 100644 --- a/neo/IO/Json/JObject.cs +++ b/neo/IO/Json/JObject.cs @@ -1,4 +1,4 @@ -using Neo.IO.Caching; +using Neo.IO.Caching; using System; using System.Collections.Generic; using System.IO; diff --git a/neo/IO/Json/JString.cs b/neo/IO/Json/JString.cs index 032470cf4e..065e7b59f9 100644 --- a/neo/IO/Json/JString.cs +++ b/neo/IO/Json/JString.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Text; diff --git a/neo/IO/Wrappers/SerializableWrapper.cs b/neo/IO/Wrappers/SerializableWrapper.cs index 098e4b9c7a..868c9bcba2 100644 --- a/neo/IO/Wrappers/SerializableWrapper.cs +++ b/neo/IO/Wrappers/SerializableWrapper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace Neo.IO.Wrappers diff --git a/neo/IO/Wrappers/UInt32Wrapper.cs b/neo/IO/Wrappers/UInt32Wrapper.cs index 6e1fb71da1..fa8406d50a 100644 --- a/neo/IO/Wrappers/UInt32Wrapper.cs +++ b/neo/IO/Wrappers/UInt32Wrapper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace Neo.IO.Wrappers diff --git a/neo/Ledger/Blockchain.ApplicationExecuted.cs b/neo/Ledger/Blockchain.ApplicationExecuted.cs index 1bcc65563f..2f5d74fcb8 100644 --- a/neo/Ledger/Blockchain.ApplicationExecuted.cs +++ b/neo/Ledger/Blockchain.ApplicationExecuted.cs @@ -1,4 +1,4 @@ -using Neo.Network.P2P.Payloads; +using Neo.Network.P2P.Payloads; using Neo.SmartContract; using Neo.VM; using System.Linq; diff --git a/neo/Ledger/Blockchain.cs b/neo/Ledger/Blockchain.cs index db879c0732..7d0b72402d 100644 --- a/neo/Ledger/Blockchain.cs +++ b/neo/Ledger/Blockchain.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.Configuration; using Neo.Cryptography.ECC; using Neo.IO; diff --git a/neo/Ledger/ContractState.cs b/neo/Ledger/ContractState.cs index f6c641d7d5..da02db912f 100644 --- a/neo/Ledger/ContractState.cs +++ b/neo/Ledger/ContractState.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.IO.Json; using Neo.SmartContract; using Neo.SmartContract.Manifest; diff --git a/neo/Ledger/HashIndexState.cs b/neo/Ledger/HashIndexState.cs index 04f7b0bd4a..f83aefd34f 100644 --- a/neo/Ledger/HashIndexState.cs +++ b/neo/Ledger/HashIndexState.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System.IO; namespace Neo.Ledger diff --git a/neo/Ledger/HeaderHashList.cs b/neo/Ledger/HeaderHashList.cs index 928a26e5d2..c9e9878235 100644 --- a/neo/Ledger/HeaderHashList.cs +++ b/neo/Ledger/HeaderHashList.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System.IO; namespace Neo.Ledger diff --git a/neo/Ledger/RelayResultReason.cs b/neo/Ledger/RelayResultReason.cs index 7bf92afac6..e698d0ea34 100644 --- a/neo/Ledger/RelayResultReason.cs +++ b/neo/Ledger/RelayResultReason.cs @@ -1,4 +1,4 @@ -namespace Neo.Ledger +namespace Neo.Ledger { public enum RelayResultReason : byte { diff --git a/neo/Ledger/StorageFlags.cs b/neo/Ledger/StorageFlags.cs index cace3c97ef..a0d7034c1d 100644 --- a/neo/Ledger/StorageFlags.cs +++ b/neo/Ledger/StorageFlags.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.Ledger { diff --git a/neo/Ledger/StorageItem.cs b/neo/Ledger/StorageItem.cs index 49ea93d8a1..37a69dba2d 100644 --- a/neo/Ledger/StorageItem.cs +++ b/neo/Ledger/StorageItem.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System.IO; namespace Neo.Ledger diff --git a/neo/Ledger/StorageKey.cs b/neo/Ledger/StorageKey.cs index c214260c21..187a895aa3 100644 --- a/neo/Ledger/StorageKey.cs +++ b/neo/Ledger/StorageKey.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO; using System; using System.IO; diff --git a/neo/Ledger/TransactionState.cs b/neo/Ledger/TransactionState.cs index c8a479424a..c493bd631e 100644 --- a/neo/Ledger/TransactionState.cs +++ b/neo/Ledger/TransactionState.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Network.P2P.Payloads; using Neo.VM; using System.IO; diff --git a/neo/Ledger/TrimmedBlock.cs b/neo/Ledger/TrimmedBlock.cs index 2a6f84672b..614ee89ac1 100644 --- a/neo/Ledger/TrimmedBlock.cs +++ b/neo/Ledger/TrimmedBlock.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.IO.Caching; using Neo.IO.Json; using Neo.Network.P2P.Payloads; diff --git a/neo/NeoSystem.cs b/neo/NeoSystem.cs index 867d4e4201..f53d6efa76 100644 --- a/neo/NeoSystem.cs +++ b/neo/NeoSystem.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Neo.Consensus; using Neo.Ledger; using Neo.Network.P2P; diff --git a/neo/Network/P2P/Capabilities/FullNodeCapability.cs b/neo/Network/P2P/Capabilities/FullNodeCapability.cs index ccaabbdb5a..7c2ae75845 100644 --- a/neo/Network/P2P/Capabilities/FullNodeCapability.cs +++ b/neo/Network/P2P/Capabilities/FullNodeCapability.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace Neo.Network.P2P.Capabilities { diff --git a/neo/Network/P2P/Capabilities/NodeCapability.cs b/neo/Network/P2P/Capabilities/NodeCapability.cs index 034afb6be8..1160dad912 100644 --- a/neo/Network/P2P/Capabilities/NodeCapability.cs +++ b/neo/Network/P2P/Capabilities/NodeCapability.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System; using System.IO; diff --git a/neo/Network/P2P/Capabilities/NodeCapabilityType.cs b/neo/Network/P2P/Capabilities/NodeCapabilityType.cs index 5ea0594d7b..e8eb71850c 100644 --- a/neo/Network/P2P/Capabilities/NodeCapabilityType.cs +++ b/neo/Network/P2P/Capabilities/NodeCapabilityType.cs @@ -1,4 +1,4 @@ -namespace Neo.Network.P2P.Capabilities +namespace Neo.Network.P2P.Capabilities { public enum NodeCapabilityType : byte { diff --git a/neo/Network/P2P/Capabilities/ServerCapability.cs b/neo/Network/P2P/Capabilities/ServerCapability.cs index 0ce31e130e..a27573d438 100644 --- a/neo/Network/P2P/Capabilities/ServerCapability.cs +++ b/neo/Network/P2P/Capabilities/ServerCapability.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace Neo.Network.P2P.Capabilities diff --git a/neo/Network/P2P/ChannelsConfig.cs b/neo/Network/P2P/ChannelsConfig.cs index 2882876bd2..fe09c54996 100644 --- a/neo/Network/P2P/ChannelsConfig.cs +++ b/neo/Network/P2P/ChannelsConfig.cs @@ -1,4 +1,4 @@ -using System.Net; +using System.Net; namespace Neo.Network.P2P { diff --git a/neo/Network/P2P/Connection.cs b/neo/Network/P2P/Connection.cs index 5a00a588ef..d741f1d0ee 100644 --- a/neo/Network/P2P/Connection.cs +++ b/neo/Network/P2P/Connection.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.IO; using System; using System.Net; diff --git a/neo/Network/P2P/Helper.cs b/neo/Network/P2P/Helper.cs index e3e7cece1b..433725c45b 100644 --- a/neo/Network/P2P/Helper.cs +++ b/neo/Network/P2P/Helper.cs @@ -1,4 +1,4 @@ -using K4os.Compression.LZ4; +using K4os.Compression.LZ4; using Neo.Network.P2P.Payloads; using System; using System.Buffers; diff --git a/neo/Network/P2P/LocalNode.cs b/neo/Network/P2P/LocalNode.cs index 79ad7fb096..6f30ed50cb 100644 --- a/neo/Network/P2P/LocalNode.cs +++ b/neo/Network/P2P/LocalNode.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Neo.IO; using Neo.Ledger; using Neo.Network.P2P.Payloads; diff --git a/neo/Network/P2P/Message.cs b/neo/Network/P2P/Message.cs index 61ee4493b4..5be16b2be0 100644 --- a/neo/Network/P2P/Message.cs +++ b/neo/Network/P2P/Message.cs @@ -1,4 +1,4 @@ -using Akka.IO; +using Akka.IO; using Neo.Cryptography; using Neo.IO; using Neo.Network.P2P.Payloads; diff --git a/neo/Network/P2P/MessageCommand.cs b/neo/Network/P2P/MessageCommand.cs index ed8dc6b96b..ce0527e136 100644 --- a/neo/Network/P2P/MessageCommand.cs +++ b/neo/Network/P2P/MessageCommand.cs @@ -1,4 +1,4 @@ -namespace Neo.Network.P2P +namespace Neo.Network.P2P { public enum MessageCommand : byte { diff --git a/neo/Network/P2P/MessageFlags.cs b/neo/Network/P2P/MessageFlags.cs index 4e8a34c1a7..9af64e5fbc 100644 --- a/neo/Network/P2P/MessageFlags.cs +++ b/neo/Network/P2P/MessageFlags.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.Network.P2P { diff --git a/neo/Network/P2P/Payloads/AddrPayload.cs b/neo/Network/P2P/Payloads/AddrPayload.cs index 0a8f09c71e..65337f0869 100644 --- a/neo/Network/P2P/Payloads/AddrPayload.cs +++ b/neo/Network/P2P/Payloads/AddrPayload.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System; using System.IO; diff --git a/neo/Network/P2P/Payloads/Block.cs b/neo/Network/P2P/Payloads/Block.cs index d339b536a0..75e5d7c424 100644 --- a/neo/Network/P2P/Payloads/Block.cs +++ b/neo/Network/P2P/Payloads/Block.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO; using Neo.IO.Json; using Neo.Ledger; diff --git a/neo/Network/P2P/Payloads/BlockBase.cs b/neo/Network/P2P/Payloads/BlockBase.cs index 90b1531cd0..20a0c98211 100644 --- a/neo/Network/P2P/Payloads/BlockBase.cs +++ b/neo/Network/P2P/Payloads/BlockBase.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO; using Neo.IO.Json; using Neo.Persistence; diff --git a/neo/Network/P2P/Payloads/ConsensusData.cs b/neo/Network/P2P/Payloads/ConsensusData.cs index 48d3d14ac8..622c42e464 100644 --- a/neo/Network/P2P/Payloads/ConsensusData.cs +++ b/neo/Network/P2P/Payloads/ConsensusData.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO; using Neo.IO.Json; using Neo.Ledger; diff --git a/neo/Network/P2P/Payloads/ConsensusPayload.cs b/neo/Network/P2P/Payloads/ConsensusPayload.cs index 062e5d9830..a4c6e86ee6 100644 --- a/neo/Network/P2P/Payloads/ConsensusPayload.cs +++ b/neo/Network/P2P/Payloads/ConsensusPayload.cs @@ -1,4 +1,4 @@ -using Neo.Consensus; +using Neo.Consensus; using Neo.Cryptography; using Neo.Cryptography.ECC; using Neo.IO; diff --git a/neo/Network/P2P/Payloads/Cosigner.cs b/neo/Network/P2P/Payloads/Cosigner.cs index 99672ecf4d..2d1f42039c 100644 --- a/neo/Network/P2P/Payloads/Cosigner.cs +++ b/neo/Network/P2P/Payloads/Cosigner.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography.ECC; +using Neo.Cryptography.ECC; using Neo.IO; using Neo.IO.Json; using System; diff --git a/neo/Network/P2P/Payloads/FilterAddPayload.cs b/neo/Network/P2P/Payloads/FilterAddPayload.cs index 3a7a4a9e6f..71bddea5dc 100644 --- a/neo/Network/P2P/Payloads/FilterAddPayload.cs +++ b/neo/Network/P2P/Payloads/FilterAddPayload.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System.IO; namespace Neo.Network.P2P.Payloads diff --git a/neo/Network/P2P/Payloads/FilterLoadPayload.cs b/neo/Network/P2P/Payloads/FilterLoadPayload.cs index dfba728fc0..5d337c8dac 100644 --- a/neo/Network/P2P/Payloads/FilterLoadPayload.cs +++ b/neo/Network/P2P/Payloads/FilterLoadPayload.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO; using System; using System.IO; diff --git a/neo/Network/P2P/Payloads/GetBlocksPayload.cs b/neo/Network/P2P/Payloads/GetBlocksPayload.cs index eccd66ed19..f7e39927f1 100644 --- a/neo/Network/P2P/Payloads/GetBlocksPayload.cs +++ b/neo/Network/P2P/Payloads/GetBlocksPayload.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System; using System.IO; diff --git a/neo/Network/P2P/Payloads/Header.cs b/neo/Network/P2P/Payloads/Header.cs index eaef0dc160..abd7fbd370 100644 --- a/neo/Network/P2P/Payloads/Header.cs +++ b/neo/Network/P2P/Payloads/Header.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Neo.Ledger; using Neo.Wallets; using System; diff --git a/neo/Network/P2P/Payloads/HeadersPayload.cs b/neo/Network/P2P/Payloads/HeadersPayload.cs index 3b13405d24..54948a142d 100644 --- a/neo/Network/P2P/Payloads/HeadersPayload.cs +++ b/neo/Network/P2P/Payloads/HeadersPayload.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/neo/Network/P2P/Payloads/IInventory.cs b/neo/Network/P2P/Payloads/IInventory.cs index 26b62346d9..dcf3114a8b 100644 --- a/neo/Network/P2P/Payloads/IInventory.cs +++ b/neo/Network/P2P/Payloads/IInventory.cs @@ -1,4 +1,4 @@ -using Neo.Persistence; +using Neo.Persistence; namespace Neo.Network.P2P.Payloads { diff --git a/neo/Network/P2P/Payloads/IVerifiable.cs b/neo/Network/P2P/Payloads/IVerifiable.cs index 8540d8a626..50651ad9ff 100644 --- a/neo/Network/P2P/Payloads/IVerifiable.cs +++ b/neo/Network/P2P/Payloads/IVerifiable.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Persistence; using System.IO; diff --git a/neo/Network/P2P/Payloads/InvPayload.cs b/neo/Network/P2P/Payloads/InvPayload.cs index 613d280234..a3bc82a4d9 100644 --- a/neo/Network/P2P/Payloads/InvPayload.cs +++ b/neo/Network/P2P/Payloads/InvPayload.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System; using System.Collections.Generic; using System.IO; diff --git a/neo/Network/P2P/Payloads/InventoryType.cs b/neo/Network/P2P/Payloads/InventoryType.cs index 775eed958f..58ad12471b 100644 --- a/neo/Network/P2P/Payloads/InventoryType.cs +++ b/neo/Network/P2P/Payloads/InventoryType.cs @@ -1,4 +1,4 @@ -namespace Neo.Network.P2P.Payloads +namespace Neo.Network.P2P.Payloads { public enum InventoryType : byte { diff --git a/neo/Network/P2P/Payloads/MerkleBlockPayload.cs b/neo/Network/P2P/Payloads/MerkleBlockPayload.cs index 0d00434cd4..11b9fb3a6e 100644 --- a/neo/Network/P2P/Payloads/MerkleBlockPayload.cs +++ b/neo/Network/P2P/Payloads/MerkleBlockPayload.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO; using System.Collections; using System.IO; diff --git a/neo/Network/P2P/Payloads/NetworkAddressWithTime.cs b/neo/Network/P2P/Payloads/NetworkAddressWithTime.cs index 6fcda2f809..01508524a5 100644 --- a/neo/Network/P2P/Payloads/NetworkAddressWithTime.cs +++ b/neo/Network/P2P/Payloads/NetworkAddressWithTime.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Network.P2P.Capabilities; using System; using System.IO; diff --git a/neo/Network/P2P/Payloads/PingPayload.cs b/neo/Network/P2P/Payloads/PingPayload.cs index 680de9dd0a..107dd501d5 100644 --- a/neo/Network/P2P/Payloads/PingPayload.cs +++ b/neo/Network/P2P/Payloads/PingPayload.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System; using System.IO; diff --git a/neo/Network/P2P/Payloads/TransactionAttribute.cs b/neo/Network/P2P/Payloads/TransactionAttribute.cs index 5adc34db8e..99d1671ebd 100644 --- a/neo/Network/P2P/Payloads/TransactionAttribute.cs +++ b/neo/Network/P2P/Payloads/TransactionAttribute.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.IO.Json; using System; using System.IO; diff --git a/neo/Network/P2P/Payloads/TransactionAttributeUsage.cs b/neo/Network/P2P/Payloads/TransactionAttributeUsage.cs index 9bf5cc204c..89c1a1cec2 100644 --- a/neo/Network/P2P/Payloads/TransactionAttributeUsage.cs +++ b/neo/Network/P2P/Payloads/TransactionAttributeUsage.cs @@ -1,4 +1,4 @@ -namespace Neo.Network.P2P.Payloads +namespace Neo.Network.P2P.Payloads { public enum TransactionAttributeUsage : byte { diff --git a/neo/Network/P2P/Payloads/VersionPayload.cs b/neo/Network/P2P/Payloads/VersionPayload.cs index 16c401b7db..754000e062 100644 --- a/neo/Network/P2P/Payloads/VersionPayload.cs +++ b/neo/Network/P2P/Payloads/VersionPayload.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.Network.P2P.Capabilities; using System; using System.IO; diff --git a/neo/Network/P2P/Payloads/Witness.cs b/neo/Network/P2P/Payloads/Witness.cs index 227d810a39..52a2186ee8 100644 --- a/neo/Network/P2P/Payloads/Witness.cs +++ b/neo/Network/P2P/Payloads/Witness.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.IO.Json; using Neo.SmartContract; using Neo.VM; diff --git a/neo/Network/P2P/Payloads/WitnessScope.cs b/neo/Network/P2P/Payloads/WitnessScope.cs index f35e550a34..e67706cbbf 100644 --- a/neo/Network/P2P/Payloads/WitnessScope.cs +++ b/neo/Network/P2P/Payloads/WitnessScope.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.Network.P2P.Payloads { diff --git a/neo/Network/P2P/Peer.cs b/neo/Network/P2P/Peer.cs index 0cbd6cbaff..eb21095685 100644 --- a/neo/Network/P2P/Peer.cs +++ b/neo/Network/P2P/Peer.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.IO; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; diff --git a/neo/Network/P2P/ProtocolHandler.cs b/neo/Network/P2P/ProtocolHandler.cs index aa7f0e06f2..63ecbe3318 100644 --- a/neo/Network/P2P/ProtocolHandler.cs +++ b/neo/Network/P2P/ProtocolHandler.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.Configuration; using Neo.Cryptography; using Neo.IO; diff --git a/neo/Network/P2P/RemoteNode.cs b/neo/Network/P2P/RemoteNode.cs index ec2a16e047..7700c896b2 100644 --- a/neo/Network/P2P/RemoteNode.cs +++ b/neo/Network/P2P/RemoteNode.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.Configuration; using Akka.IO; using Neo.Cryptography; diff --git a/neo/Network/P2P/TaskManager.cs b/neo/Network/P2P/TaskManager.cs index 2c0f7ae07b..cd96547df8 100644 --- a/neo/Network/P2P/TaskManager.cs +++ b/neo/Network/P2P/TaskManager.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Akka.Configuration; using Neo.IO.Actors; using Neo.IO.Caching; diff --git a/neo/Network/P2P/TaskSession.cs b/neo/Network/P2P/TaskSession.cs index a1cf8a0ffc..5617e0efa1 100644 --- a/neo/Network/P2P/TaskSession.cs +++ b/neo/Network/P2P/TaskSession.cs @@ -1,4 +1,4 @@ -using Akka.Actor; +using Akka.Actor; using Neo.Network.P2P.Capabilities; using Neo.Network.P2P.Payloads; using System; diff --git a/neo/Network/RPC/Models/RpcBlock.cs b/neo/Network/RPC/Models/RpcBlock.cs index f71af51168..0d49b3b53a 100644 --- a/neo/Network/RPC/Models/RpcBlock.cs +++ b/neo/Network/RPC/Models/RpcBlock.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Neo.Network.P2P.Payloads; namespace Neo.Network.RPC.Models diff --git a/neo/Network/RPC/Models/RpcBlockHeader.cs b/neo/Network/RPC/Models/RpcBlockHeader.cs index 2b9293ecaf..250acfd818 100644 --- a/neo/Network/RPC/Models/RpcBlockHeader.cs +++ b/neo/Network/RPC/Models/RpcBlockHeader.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Neo.Network.P2P.Payloads; namespace Neo.Network.RPC.Models diff --git a/neo/Network/RPC/Models/RpcInvokeResult.cs b/neo/Network/RPC/Models/RpcInvokeResult.cs index 73f2c6a2af..9df9492e2b 100644 --- a/neo/Network/RPC/Models/RpcInvokeResult.cs +++ b/neo/Network/RPC/Models/RpcInvokeResult.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Newtonsoft.Json; using System.Linq; diff --git a/neo/Network/RPC/Models/RpcNep5Balances.cs b/neo/Network/RPC/Models/RpcNep5Balances.cs index b471ab4545..f29f0c5564 100644 --- a/neo/Network/RPC/Models/RpcNep5Balances.cs +++ b/neo/Network/RPC/Models/RpcNep5Balances.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System.Linq; using System.Numerics; diff --git a/neo/Network/RPC/Models/RpcPeers.cs b/neo/Network/RPC/Models/RpcPeers.cs index fac73842de..5caa99a66a 100644 --- a/neo/Network/RPC/Models/RpcPeers.cs +++ b/neo/Network/RPC/Models/RpcPeers.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System.Linq; namespace Neo.Network.RPC.Models diff --git a/neo/Network/RPC/Models/RpcPlugin.cs b/neo/Network/RPC/Models/RpcPlugin.cs index db03f70eb3..ae778ee87a 100644 --- a/neo/Network/RPC/Models/RpcPlugin.cs +++ b/neo/Network/RPC/Models/RpcPlugin.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System.Linq; namespace Neo.Network.RPC.Models diff --git a/neo/Network/RPC/Models/RpcRawMemPool.cs b/neo/Network/RPC/Models/RpcRawMemPool.cs index c5ebd63419..df439bf3a6 100644 --- a/neo/Network/RPC/Models/RpcRawMemPool.cs +++ b/neo/Network/RPC/Models/RpcRawMemPool.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System.Linq; namespace Neo.Network.RPC.Models diff --git a/neo/Network/RPC/Models/RpcRequest.cs b/neo/Network/RPC/Models/RpcRequest.cs index 1970adedbf..010e3037b8 100644 --- a/neo/Network/RPC/Models/RpcRequest.cs +++ b/neo/Network/RPC/Models/RpcRequest.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System.Linq; namespace Neo.Network.RPC.Models diff --git a/neo/Network/RPC/Models/RpcResponse.cs b/neo/Network/RPC/Models/RpcResponse.cs index e4ebcaed1b..ff20200519 100644 --- a/neo/Network/RPC/Models/RpcResponse.cs +++ b/neo/Network/RPC/Models/RpcResponse.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; namespace Neo.Network.RPC.Models { diff --git a/neo/Network/RPC/Models/RpcTransaction.cs b/neo/Network/RPC/Models/RpcTransaction.cs index f41c04710a..3e45830ae6 100644 --- a/neo/Network/RPC/Models/RpcTransaction.cs +++ b/neo/Network/RPC/Models/RpcTransaction.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Neo.Network.P2P.Payloads; namespace Neo.Network.RPC.Models diff --git a/neo/Network/RPC/Models/RpcValidateAddressResult.cs b/neo/Network/RPC/Models/RpcValidateAddressResult.cs index 5e0a704797..f33467356e 100644 --- a/neo/Network/RPC/Models/RpcValidateAddressResult.cs +++ b/neo/Network/RPC/Models/RpcValidateAddressResult.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; namespace Neo.Network.RPC.Models { diff --git a/neo/Network/RPC/Models/RpcValidator.cs b/neo/Network/RPC/Models/RpcValidator.cs index f3116ed2e4..b694a6dfcd 100644 --- a/neo/Network/RPC/Models/RpcValidator.cs +++ b/neo/Network/RPC/Models/RpcValidator.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System.Numerics; namespace Neo.Network.RPC.Models diff --git a/neo/Network/RPC/Models/RpcVersion.cs b/neo/Network/RPC/Models/RpcVersion.cs index 8163875b64..02f4dc3407 100644 --- a/neo/Network/RPC/Models/RpcVersion.cs +++ b/neo/Network/RPC/Models/RpcVersion.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; namespace Neo.Network.RPC.Models { diff --git a/neo/Network/RPC/RpcClient.cs b/neo/Network/RPC/RpcClient.cs index 69352b8cfd..4b968163c7 100644 --- a/neo/Network/RPC/RpcClient.cs +++ b/neo/Network/RPC/RpcClient.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Neo.Ledger; using Neo.Network.RPC.Models; using System; diff --git a/neo/Network/RPC/RpcException.cs b/neo/Network/RPC/RpcException.cs index b5030750ca..5a2120f083 100644 --- a/neo/Network/RPC/RpcException.cs +++ b/neo/Network/RPC/RpcException.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.Network.RPC { diff --git a/neo/Persistence/CloneSnapshot.cs b/neo/Persistence/CloneSnapshot.cs index 0b79bd2739..9f86f2a1bf 100644 --- a/neo/Persistence/CloneSnapshot.cs +++ b/neo/Persistence/CloneSnapshot.cs @@ -1,4 +1,4 @@ -using Neo.IO.Caching; +using Neo.IO.Caching; using Neo.IO.Wrappers; using Neo.Ledger; diff --git a/neo/Persistence/Helper.cs b/neo/Persistence/Helper.cs index 7f412e47d3..d884e0da6b 100644 --- a/neo/Persistence/Helper.cs +++ b/neo/Persistence/Helper.cs @@ -1,4 +1,4 @@ -using Neo.Ledger; +using Neo.Ledger; using Neo.Network.P2P.Payloads; namespace Neo.Persistence diff --git a/neo/Persistence/IPersistence.cs b/neo/Persistence/IPersistence.cs index 0632b5d0fa..34f1169f9b 100644 --- a/neo/Persistence/IPersistence.cs +++ b/neo/Persistence/IPersistence.cs @@ -1,4 +1,4 @@ -using Neo.IO.Caching; +using Neo.IO.Caching; using Neo.IO.Wrappers; using Neo.Ledger; diff --git a/neo/Persistence/LevelDB/DbCache.cs b/neo/Persistence/LevelDB/DbCache.cs index ae55b31326..86ff7a39ea 100644 --- a/neo/Persistence/LevelDB/DbCache.cs +++ b/neo/Persistence/LevelDB/DbCache.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.IO.Caching; using Neo.IO.Data.LevelDB; using System; diff --git a/neo/Persistence/LevelDB/DbMetaDataCache.cs b/neo/Persistence/LevelDB/DbMetaDataCache.cs index 0163d84e39..e2c03ca2fd 100644 --- a/neo/Persistence/LevelDB/DbMetaDataCache.cs +++ b/neo/Persistence/LevelDB/DbMetaDataCache.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.IO.Caching; using Neo.IO.Data.LevelDB; using System; diff --git a/neo/Persistence/LevelDB/DbSnapshot.cs b/neo/Persistence/LevelDB/DbSnapshot.cs index 365584fa7c..f7ade52ad8 100644 --- a/neo/Persistence/LevelDB/DbSnapshot.cs +++ b/neo/Persistence/LevelDB/DbSnapshot.cs @@ -1,4 +1,4 @@ -using Neo.IO.Caching; +using Neo.IO.Caching; using Neo.IO.Data.LevelDB; using Neo.IO.Wrappers; using Neo.Ledger; diff --git a/neo/Persistence/LevelDB/LevelDBStore.cs b/neo/Persistence/LevelDB/LevelDBStore.cs index bb6ac26698..189f0cfbb5 100644 --- a/neo/Persistence/LevelDB/LevelDBStore.cs +++ b/neo/Persistence/LevelDB/LevelDBStore.cs @@ -1,4 +1,4 @@ -using Neo.IO.Caching; +using Neo.IO.Caching; using Neo.IO.Data.LevelDB; using Neo.IO.Wrappers; using Neo.Ledger; diff --git a/neo/Persistence/LevelDB/Prefixes.cs b/neo/Persistence/LevelDB/Prefixes.cs index f40359a55a..605e9f1451 100644 --- a/neo/Persistence/LevelDB/Prefixes.cs +++ b/neo/Persistence/LevelDB/Prefixes.cs @@ -1,4 +1,4 @@ -namespace Neo.Persistence.LevelDB +namespace Neo.Persistence.LevelDB { internal static class Prefixes { diff --git a/neo/Persistence/Snapshot.cs b/neo/Persistence/Snapshot.cs index 1e900800b0..f058562200 100644 --- a/neo/Persistence/Snapshot.cs +++ b/neo/Persistence/Snapshot.cs @@ -1,4 +1,4 @@ -using Neo.IO.Caching; +using Neo.IO.Caching; using Neo.IO.Wrappers; using Neo.Ledger; using Neo.Network.P2P.Payloads; diff --git a/neo/Persistence/Store.cs b/neo/Persistence/Store.cs index 3dc7127f3a..7b5b3b6435 100644 --- a/neo/Persistence/Store.cs +++ b/neo/Persistence/Store.cs @@ -1,4 +1,4 @@ -using Neo.IO.Caching; +using Neo.IO.Caching; using Neo.IO.Wrappers; using Neo.Ledger; diff --git a/neo/Plugins/ILogPlugin.cs b/neo/Plugins/ILogPlugin.cs index c0733f9143..ff1052be2e 100644 --- a/neo/Plugins/ILogPlugin.cs +++ b/neo/Plugins/ILogPlugin.cs @@ -1,4 +1,4 @@ -namespace Neo.Plugins +namespace Neo.Plugins { public interface ILogPlugin { diff --git a/neo/Plugins/IMemoryPoolTxObserverPlugin.cs b/neo/Plugins/IMemoryPoolTxObserverPlugin.cs index 3dd1cb3ef2..e596b9a7b5 100644 --- a/neo/Plugins/IMemoryPoolTxObserverPlugin.cs +++ b/neo/Plugins/IMemoryPoolTxObserverPlugin.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Neo.Network.P2P.Payloads; namespace Neo.Plugins diff --git a/neo/Plugins/IP2PPlugin.cs b/neo/Plugins/IP2PPlugin.cs index e2043104fc..3029aaf849 100644 --- a/neo/Plugins/IP2PPlugin.cs +++ b/neo/Plugins/IP2PPlugin.cs @@ -1,4 +1,4 @@ -using Neo.Network.P2P; +using Neo.Network.P2P; using Neo.Network.P2P.Payloads; namespace Neo.Plugins diff --git a/neo/Plugins/IPersistencePlugin.cs b/neo/Plugins/IPersistencePlugin.cs index 0f06ae51eb..af3cbe05b8 100644 --- a/neo/Plugins/IPersistencePlugin.cs +++ b/neo/Plugins/IPersistencePlugin.cs @@ -1,4 +1,4 @@ -using System; +using System; using Neo.Persistence; using System.Collections.Generic; using static Neo.Ledger.Blockchain; diff --git a/neo/Plugins/IRpcPlugin.cs b/neo/Plugins/IRpcPlugin.cs index 92e7a0fa48..19e5b71808 100644 --- a/neo/Plugins/IRpcPlugin.cs +++ b/neo/Plugins/IRpcPlugin.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http; using Neo.IO.Json; namespace Neo.Plugins diff --git a/neo/Plugins/LogLevel.cs b/neo/Plugins/LogLevel.cs index 8f6e0b9df7..72158c8aad 100644 --- a/neo/Plugins/LogLevel.cs +++ b/neo/Plugins/LogLevel.cs @@ -1,4 +1,4 @@ -namespace Neo.Plugins +namespace Neo.Plugins { public enum LogLevel : byte { diff --git a/neo/Plugins/MemoryPoolTxRemovalReason.cs b/neo/Plugins/MemoryPoolTxRemovalReason.cs index d08a37eba2..f7320dc60e 100644 --- a/neo/Plugins/MemoryPoolTxRemovalReason.cs +++ b/neo/Plugins/MemoryPoolTxRemovalReason.cs @@ -1,4 +1,4 @@ -namespace Neo.Plugins +namespace Neo.Plugins { public enum MemoryPoolTxRemovalReason : byte { diff --git a/neo/Plugins/Plugin.cs b/neo/Plugins/Plugin.cs index aa04b0778d..72c7ce3b14 100644 --- a/neo/Plugins/Plugin.cs +++ b/neo/Plugins/Plugin.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; using System; using System.Collections.Generic; using System.IO; diff --git a/neo/ProtocolSettings.cs b/neo/ProtocolSettings.cs index 18c915d614..381e56c8a7 100644 --- a/neo/ProtocolSettings.cs +++ b/neo/ProtocolSettings.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; using System; using System.Linq; using System.Threading; diff --git a/neo/SmartContract/ApplicationEngine.OpCodePrices.cs b/neo/SmartContract/ApplicationEngine.OpCodePrices.cs index 271a76f935..9da0f6c75d 100644 --- a/neo/SmartContract/ApplicationEngine.OpCodePrices.cs +++ b/neo/SmartContract/ApplicationEngine.OpCodePrices.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; using System.Collections.Generic; namespace Neo.SmartContract diff --git a/neo/SmartContract/ApplicationEngine.cs b/neo/SmartContract/ApplicationEngine.cs index 2eeeef52e0..45763ed30a 100644 --- a/neo/SmartContract/ApplicationEngine.cs +++ b/neo/SmartContract/ApplicationEngine.cs @@ -49,16 +49,16 @@ private bool AddGas(long gas) return testMode || GasConsumed <= gas_amount; } - protected override void LoadContext(ExecutionContext context) - { - // Set default execution context state - - context.SetState(new ExecutionContextState() - { - ScriptHash = ((byte[])context.Script).ToScriptHash() - }); - - base.LoadContext(context); + protected override void LoadContext(ExecutionContext context) + { + // Set default execution context state + + context.SetState(new ExecutionContextState() + { + ScriptHash = ((byte[])context.Script).ToScriptHash() + }); + + base.LoadContext(context); } public override void Dispose() diff --git a/neo/SmartContract/ContainerPlaceholder.cs b/neo/SmartContract/ContainerPlaceholder.cs index a379ddd9d3..14e97ae848 100644 --- a/neo/SmartContract/ContainerPlaceholder.cs +++ b/neo/SmartContract/ContainerPlaceholder.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; using System; namespace Neo.SmartContract diff --git a/neo/SmartContract/Contract.cs b/neo/SmartContract/Contract.cs index 19fcceb7ca..8d23997006 100644 --- a/neo/SmartContract/Contract.cs +++ b/neo/SmartContract/Contract.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography.ECC; +using Neo.Cryptography.ECC; using Neo.VM; using Neo.Wallets; using System; diff --git a/neo/SmartContract/ContractParameter.cs b/neo/SmartContract/ContractParameter.cs index cae59229b8..5e78005e13 100644 --- a/neo/SmartContract/ContractParameter.cs +++ b/neo/SmartContract/ContractParameter.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography.ECC; +using Neo.Cryptography.ECC; using Neo.IO.Json; using System; using System.Collections.Generic; diff --git a/neo/SmartContract/ContractParameterType.cs b/neo/SmartContract/ContractParameterType.cs index 748ff86654..67191852fa 100644 --- a/neo/SmartContract/ContractParameterType.cs +++ b/neo/SmartContract/ContractParameterType.cs @@ -1,4 +1,4 @@ -namespace Neo.SmartContract +namespace Neo.SmartContract { public enum ContractParameterType : byte { diff --git a/neo/SmartContract/ContractParametersContext.cs b/neo/SmartContract/ContractParametersContext.cs index 8a91c936b8..35a2c36898 100644 --- a/neo/SmartContract/ContractParametersContext.cs +++ b/neo/SmartContract/ContractParametersContext.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography.ECC; +using Neo.Cryptography.ECC; using Neo.IO.Json; using Neo.Ledger; using Neo.Network.P2P.Payloads; @@ -72,14 +72,14 @@ public bool Completed } } - /// - /// Cache for public ScriptHashes field + /// + /// Cache for public ScriptHashes field /// private UInt160[] _ScriptHashes = null; - /// - /// ScriptHashes are the verifiable ScriptHashes from Verifiable element - /// Equivalent to: Verifiable.GetScriptHashesForVerifying(Blockchain.Singleton.GetSnapshot()) + /// + /// ScriptHashes are the verifiable ScriptHashes from Verifiable element + /// Equivalent to: Verifiable.GetScriptHashesForVerifying(Blockchain.Singleton.GetSnapshot()) /// public IReadOnlyList ScriptHashes { diff --git a/neo/SmartContract/Enumerators/ConcatenatedEnumerator.cs b/neo/SmartContract/Enumerators/ConcatenatedEnumerator.cs index 2b75b1d46b..36e8c4fe97 100644 --- a/neo/SmartContract/Enumerators/ConcatenatedEnumerator.cs +++ b/neo/SmartContract/Enumerators/ConcatenatedEnumerator.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; namespace Neo.SmartContract.Enumerators { diff --git a/neo/SmartContract/Enumerators/IEnumerator.cs b/neo/SmartContract/Enumerators/IEnumerator.cs index 4d1f11fe65..27e30b5e18 100644 --- a/neo/SmartContract/Enumerators/IEnumerator.cs +++ b/neo/SmartContract/Enumerators/IEnumerator.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; using System; namespace Neo.SmartContract.Enumerators diff --git a/neo/SmartContract/Enumerators/IteratorKeysWrapper.cs b/neo/SmartContract/Enumerators/IteratorKeysWrapper.cs index d134eb884c..ef2e49d49f 100644 --- a/neo/SmartContract/Enumerators/IteratorKeysWrapper.cs +++ b/neo/SmartContract/Enumerators/IteratorKeysWrapper.cs @@ -1,4 +1,4 @@ -using Neo.SmartContract.Iterators; +using Neo.SmartContract.Iterators; using Neo.VM; namespace Neo.SmartContract.Enumerators diff --git a/neo/SmartContract/Enumerators/IteratorValuesWrapper.cs b/neo/SmartContract/Enumerators/IteratorValuesWrapper.cs index 15e06f2223..fb69070d40 100644 --- a/neo/SmartContract/Enumerators/IteratorValuesWrapper.cs +++ b/neo/SmartContract/Enumerators/IteratorValuesWrapper.cs @@ -1,4 +1,4 @@ -using Neo.SmartContract.Iterators; +using Neo.SmartContract.Iterators; using Neo.VM; namespace Neo.SmartContract.Enumerators diff --git a/neo/SmartContract/ExecutionContextState.cs b/neo/SmartContract/ExecutionContextState.cs index 11e6f88a00..7895d943a2 100644 --- a/neo/SmartContract/ExecutionContextState.cs +++ b/neo/SmartContract/ExecutionContextState.cs @@ -1,10 +1,10 @@ -namespace Neo.SmartContract -{ - public class ExecutionContextState - { - /// - /// Script hash - /// - public UInt160 ScriptHash { get; set; } - } +namespace Neo.SmartContract +{ + public class ExecutionContextState + { + /// + /// Script hash + /// + public UInt160 ScriptHash { get; set; } + } } \ No newline at end of file diff --git a/neo/SmartContract/Helper.cs b/neo/SmartContract/Helper.cs index 6a22249cd7..259e997b09 100644 --- a/neo/SmartContract/Helper.cs +++ b/neo/SmartContract/Helper.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO; using Neo.Network.P2P.Payloads; using Neo.Persistence; diff --git a/neo/SmartContract/InteropDescriptor.cs b/neo/SmartContract/InteropDescriptor.cs index 6db599ea64..c283e474de 100644 --- a/neo/SmartContract/InteropDescriptor.cs +++ b/neo/SmartContract/InteropDescriptor.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; using System; namespace Neo.SmartContract diff --git a/neo/SmartContract/InteropService.NEO.cs b/neo/SmartContract/InteropService.NEO.cs index 7f0d857fe9..91b941649f 100644 --- a/neo/SmartContract/InteropService.NEO.cs +++ b/neo/SmartContract/InteropService.NEO.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO.Json; using Neo.Ledger; using Neo.Network.P2P; diff --git a/neo/SmartContract/InteropService.cs b/neo/SmartContract/InteropService.cs index b4121d7a24..9fbb5c6675 100644 --- a/neo/SmartContract/InteropService.cs +++ b/neo/SmartContract/InteropService.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.Cryptography.ECC; using Neo.IO; using Neo.Ledger; diff --git a/neo/SmartContract/Iterators/ArrayWrapper.cs b/neo/SmartContract/Iterators/ArrayWrapper.cs index 883327bee0..3284f1317f 100644 --- a/neo/SmartContract/Iterators/ArrayWrapper.cs +++ b/neo/SmartContract/Iterators/ArrayWrapper.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; using System; using System.Collections.Generic; diff --git a/neo/SmartContract/Iterators/IIterator.cs b/neo/SmartContract/Iterators/IIterator.cs index 3438286615..ca67ae0331 100644 --- a/neo/SmartContract/Iterators/IIterator.cs +++ b/neo/SmartContract/Iterators/IIterator.cs @@ -1,4 +1,4 @@ -using Neo.SmartContract.Enumerators; +using Neo.SmartContract.Enumerators; using Neo.VM; namespace Neo.SmartContract.Iterators diff --git a/neo/SmartContract/Iterators/MapWrapper.cs b/neo/SmartContract/Iterators/MapWrapper.cs index 343b946982..d42f940fac 100644 --- a/neo/SmartContract/Iterators/MapWrapper.cs +++ b/neo/SmartContract/Iterators/MapWrapper.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; using System.Collections.Generic; namespace Neo.SmartContract.Iterators diff --git a/neo/SmartContract/Iterators/StorageIterator.cs b/neo/SmartContract/Iterators/StorageIterator.cs index 45c9d21ebd..2dd604d5d8 100644 --- a/neo/SmartContract/Iterators/StorageIterator.cs +++ b/neo/SmartContract/Iterators/StorageIterator.cs @@ -1,4 +1,4 @@ -using Neo.Ledger; +using Neo.Ledger; using Neo.VM; using System.Collections.Generic; diff --git a/neo/SmartContract/JsonSerializer.cs b/neo/SmartContract/JsonSerializer.cs index a4853fc39a..d635c6c7b8 100644 --- a/neo/SmartContract/JsonSerializer.cs +++ b/neo/SmartContract/JsonSerializer.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Neo.VM; using Neo.VM.Types; using System; diff --git a/neo/SmartContract/LogEventArgs.cs b/neo/SmartContract/LogEventArgs.cs index 8c007fe101..d124b6f9ab 100644 --- a/neo/SmartContract/LogEventArgs.cs +++ b/neo/SmartContract/LogEventArgs.cs @@ -1,4 +1,4 @@ -using Neo.Network.P2P.Payloads; +using Neo.Network.P2P.Payloads; using System; namespace Neo.SmartContract diff --git a/neo/SmartContract/Manifest/ContractAbi.cs b/neo/SmartContract/Manifest/ContractAbi.cs index 1d27ae4f1b..033306f8e6 100644 --- a/neo/SmartContract/Manifest/ContractAbi.cs +++ b/neo/SmartContract/Manifest/ContractAbi.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System.Linq; namespace Neo.SmartContract.Manifest diff --git a/neo/SmartContract/Manifest/ContractEventDescriptor.cs b/neo/SmartContract/Manifest/ContractEventDescriptor.cs index 00748f9b09..b06b64f341 100644 --- a/neo/SmartContract/Manifest/ContractEventDescriptor.cs +++ b/neo/SmartContract/Manifest/ContractEventDescriptor.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System.Linq; namespace Neo.SmartContract.Manifest diff --git a/neo/SmartContract/Manifest/ContractFeatures.cs b/neo/SmartContract/Manifest/ContractFeatures.cs index 9f94a9d3f1..dd8336f695 100644 --- a/neo/SmartContract/Manifest/ContractFeatures.cs +++ b/neo/SmartContract/Manifest/ContractFeatures.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.SmartContract.Manifest { diff --git a/neo/SmartContract/Manifest/ContractGroup.cs b/neo/SmartContract/Manifest/ContractGroup.cs index 75359e782a..fd73787a09 100644 --- a/neo/SmartContract/Manifest/ContractGroup.cs +++ b/neo/SmartContract/Manifest/ContractGroup.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.Cryptography.ECC; using Neo.IO.Json; diff --git a/neo/SmartContract/Manifest/ContractManifest.cs b/neo/SmartContract/Manifest/ContractManifest.cs index ebbcd61f2c..967a10e856 100644 --- a/neo/SmartContract/Manifest/ContractManifest.cs +++ b/neo/SmartContract/Manifest/ContractManifest.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.IO.Json; using System.IO; using System.Linq; diff --git a/neo/SmartContract/Manifest/ContractMethodDescriptor.cs b/neo/SmartContract/Manifest/ContractMethodDescriptor.cs index 476ec546a6..c631aa0450 100644 --- a/neo/SmartContract/Manifest/ContractMethodDescriptor.cs +++ b/neo/SmartContract/Manifest/ContractMethodDescriptor.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System; using System.Linq; diff --git a/neo/SmartContract/Manifest/ContractParameterDefinition.cs b/neo/SmartContract/Manifest/ContractParameterDefinition.cs index 3f184d6ba8..af07315a3a 100644 --- a/neo/SmartContract/Manifest/ContractParameterDefinition.cs +++ b/neo/SmartContract/Manifest/ContractParameterDefinition.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System; namespace Neo.SmartContract.Manifest diff --git a/neo/SmartContract/Manifest/ContractPermission.cs b/neo/SmartContract/Manifest/ContractPermission.cs index 890de9d200..b7d1d54bb9 100644 --- a/neo/SmartContract/Manifest/ContractPermission.cs +++ b/neo/SmartContract/Manifest/ContractPermission.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System; using System.Linq; diff --git a/neo/SmartContract/Manifest/ContractPermissionDescriptor.cs b/neo/SmartContract/Manifest/ContractPermissionDescriptor.cs index 909ae27e42..7b64a66935 100644 --- a/neo/SmartContract/Manifest/ContractPermissionDescriptor.cs +++ b/neo/SmartContract/Manifest/ContractPermissionDescriptor.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography.ECC; +using Neo.Cryptography.ECC; using Neo.IO.Json; using System; diff --git a/neo/SmartContract/Manifest/WildCardContainer.cs b/neo/SmartContract/Manifest/WildCardContainer.cs index 12dbac60fe..aab6ba838e 100644 --- a/neo/SmartContract/Manifest/WildCardContainer.cs +++ b/neo/SmartContract/Manifest/WildCardContainer.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System; using System.Collections; using System.Collections.Generic; diff --git a/neo/SmartContract/Native/ContractMethodAttribute.cs b/neo/SmartContract/Native/ContractMethodAttribute.cs index 42b414eed6..393737d92e 100644 --- a/neo/SmartContract/Native/ContractMethodAttribute.cs +++ b/neo/SmartContract/Native/ContractMethodAttribute.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.SmartContract.Native { diff --git a/neo/SmartContract/Native/ContractMethodMetadata.cs b/neo/SmartContract/Native/ContractMethodMetadata.cs index 9267bb7db9..f63344eec9 100644 --- a/neo/SmartContract/Native/ContractMethodMetadata.cs +++ b/neo/SmartContract/Native/ContractMethodMetadata.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; using System; using VMArray = Neo.VM.Types.Array; diff --git a/neo/SmartContract/Native/NativeContract.cs b/neo/SmartContract/Native/NativeContract.cs index 546743fc49..08971dcf6b 100644 --- a/neo/SmartContract/Native/NativeContract.cs +++ b/neo/SmartContract/Native/NativeContract.cs @@ -1,4 +1,4 @@ -#pragma warning disable IDE0060 +#pragma warning disable IDE0060 using Neo.IO; using Neo.Ledger; diff --git a/neo/SmartContract/Native/PolicyContract.cs b/neo/SmartContract/Native/PolicyContract.cs index 3ffe8199e5..c5820cfd15 100644 --- a/neo/SmartContract/Native/PolicyContract.cs +++ b/neo/SmartContract/Native/PolicyContract.cs @@ -1,4 +1,4 @@ -#pragma warning disable IDE0051 +#pragma warning disable IDE0051 #pragma warning disable IDE0060 using Neo.IO; diff --git a/neo/SmartContract/Native/Tokens/GasToken.cs b/neo/SmartContract/Native/Tokens/GasToken.cs index 7ef522dab7..fd39979670 100644 --- a/neo/SmartContract/Native/Tokens/GasToken.cs +++ b/neo/SmartContract/Native/Tokens/GasToken.cs @@ -1,4 +1,4 @@ -#pragma warning disable IDE0051 +#pragma warning disable IDE0051 using Neo.Cryptography.ECC; using Neo.Ledger; diff --git a/neo/SmartContract/Native/Tokens/Nep5AccountState.cs b/neo/SmartContract/Native/Tokens/Nep5AccountState.cs index aa62cf4bec..c775f044ec 100644 --- a/neo/SmartContract/Native/Tokens/Nep5AccountState.cs +++ b/neo/SmartContract/Native/Tokens/Nep5AccountState.cs @@ -1,4 +1,4 @@ -using Neo.VM; +using Neo.VM; using Neo.VM.Types; using System.Numerics; diff --git a/neo/SmartContract/Native/Tokens/Nep5Token.cs b/neo/SmartContract/Native/Tokens/Nep5Token.cs index a95885a665..6a2e1c78b3 100644 --- a/neo/SmartContract/Native/Tokens/Nep5Token.cs +++ b/neo/SmartContract/Native/Tokens/Nep5Token.cs @@ -1,4 +1,4 @@ -#pragma warning disable IDE0060 +#pragma warning disable IDE0060 using Neo.Ledger; using Neo.Persistence; diff --git a/neo/SmartContract/NefFile.cs b/neo/SmartContract/NefFile.cs index e0068b7213..52507eda08 100644 --- a/neo/SmartContract/NefFile.cs +++ b/neo/SmartContract/NefFile.cs @@ -1,129 +1,129 @@ -using Neo.Cryptography; -using Neo.IO; -using System; -using System.IO; - -namespace Neo.SmartContract -{ - /// - /// +------------+-----------+------------------------------------------------------------+ - /// | Field | Length | Comment | - /// +------------+-----------+------------------------------------------------------------+ - /// | Magic | 4 bytes | Magic header | - /// | Compiler | 32 bytes | Compiler used | - /// | Version | 16 bytes | Compiler version (Mayor, Minor, Build, Version) | - /// | ScriptHash | 20 bytes | ScriptHash for the script | - /// +------------+-----------+------------------------------------------------------------+ - /// | Checksum | 4 bytes | Sha256 of the header (CRC) | - /// +------------+-----------+------------------------------------------------------------+ - /// | Script | Var bytes | Var bytes for the payload | - /// +------------+-----------+------------------------------------------------------------+ - /// - public class NefFile : ISerializable - { - /// - /// NEO Executable Format 3 (NEF3) - /// - private const uint Magic = 0x3346454E; - - /// - /// Compiler - /// - public string Compiler { get; set; } - - /// - /// Version - /// - public Version Version { get; set; } - - /// - /// Script Hash - /// - public UInt160 ScriptHash { get; set; } - - /// - /// Checksum - /// - public uint CheckSum { get; set; } - - /// - /// Script - /// - public byte[] Script { get; set; } - - private const int HeaderSize = - sizeof(uint) + // Magic - 32 + // Compiler - (sizeof(int) * 4) + // Version - UInt160.Length + // ScriptHash - sizeof(uint); // Checksum - - public int Size => - HeaderSize + // Header - Script.GetVarSize(); // Script - - public void Serialize(BinaryWriter writer) - { - writer.Write(Magic); - writer.WriteFixedString(Compiler, 32); - - // Version - writer.Write(Version.Major); - writer.Write(Version.Minor); - writer.Write(Version.Build); - writer.Write(Version.Revision); - - writer.Write(ScriptHash); - writer.Write(CheckSum); - writer.WriteVarBytes(Script ?? new byte[0]); - } - - public void Deserialize(BinaryReader reader) - { - if (reader.ReadUInt32() != Magic) - { - throw new FormatException("Wrong magic"); - } - - Compiler = reader.ReadFixedString(32); - Version = new Version(reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32()); - ScriptHash = reader.ReadSerializable(); - CheckSum = reader.ReadUInt32(); - - if (CheckSum != ComputeChecksum(this)) - { - throw new FormatException("CRC verification fail"); - } - - Script = reader.ReadVarBytes(1024 * 1024); - - if (Script.ToScriptHash() != ScriptHash) - { - throw new FormatException("ScriptHash is different"); - } - } - - /// - /// Compute checksum for a file - /// - /// File - /// Return checksum - public static uint ComputeChecksum(NefFile file) - { - using (var ms = new MemoryStream()) - using (var wr = new BinaryWriter(ms)) - { - file.Serialize(wr); - wr.Flush(); - - // Read header without CRC - - var buffer = new byte[HeaderSize - sizeof(uint)]; - ms.Seek(0, SeekOrigin.Begin); - ms.Read(buffer, 0, buffer.Length); - - return BitConverter.ToUInt32(buffer.Sha256(), 0); - } - } - } -} +using Neo.Cryptography; +using Neo.IO; +using System; +using System.IO; + +namespace Neo.SmartContract +{ + /// + /// +------------+-----------+------------------------------------------------------------+ + /// | Field | Length | Comment | + /// +------------+-----------+------------------------------------------------------------+ + /// | Magic | 4 bytes | Magic header | + /// | Compiler | 32 bytes | Compiler used | + /// | Version | 16 bytes | Compiler version (Mayor, Minor, Build, Version) | + /// | ScriptHash | 20 bytes | ScriptHash for the script | + /// +------------+-----------+------------------------------------------------------------+ + /// | Checksum | 4 bytes | Sha256 of the header (CRC) | + /// +------------+-----------+------------------------------------------------------------+ + /// | Script | Var bytes | Var bytes for the payload | + /// +------------+-----------+------------------------------------------------------------+ + /// + public class NefFile : ISerializable + { + /// + /// NEO Executable Format 3 (NEF3) + /// + private const uint Magic = 0x3346454E; + + /// + /// Compiler + /// + public string Compiler { get; set; } + + /// + /// Version + /// + public Version Version { get; set; } + + /// + /// Script Hash + /// + public UInt160 ScriptHash { get; set; } + + /// + /// Checksum + /// + public uint CheckSum { get; set; } + + /// + /// Script + /// + public byte[] Script { get; set; } + + private const int HeaderSize = + sizeof(uint) + // Magic + 32 + // Compiler + (sizeof(int) * 4) + // Version + UInt160.Length + // ScriptHash + sizeof(uint); // Checksum + + public int Size => + HeaderSize + // Header + Script.GetVarSize(); // Script + + public void Serialize(BinaryWriter writer) + { + writer.Write(Magic); + writer.WriteFixedString(Compiler, 32); + + // Version + writer.Write(Version.Major); + writer.Write(Version.Minor); + writer.Write(Version.Build); + writer.Write(Version.Revision); + + writer.Write(ScriptHash); + writer.Write(CheckSum); + writer.WriteVarBytes(Script ?? new byte[0]); + } + + public void Deserialize(BinaryReader reader) + { + if (reader.ReadUInt32() != Magic) + { + throw new FormatException("Wrong magic"); + } + + Compiler = reader.ReadFixedString(32); + Version = new Version(reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32()); + ScriptHash = reader.ReadSerializable(); + CheckSum = reader.ReadUInt32(); + + if (CheckSum != ComputeChecksum(this)) + { + throw new FormatException("CRC verification fail"); + } + + Script = reader.ReadVarBytes(1024 * 1024); + + if (Script.ToScriptHash() != ScriptHash) + { + throw new FormatException("ScriptHash is different"); + } + } + + /// + /// Compute checksum for a file + /// + /// File + /// Return checksum + public static uint ComputeChecksum(NefFile file) + { + using (var ms = new MemoryStream()) + using (var wr = new BinaryWriter(ms)) + { + file.Serialize(wr); + wr.Flush(); + + // Read header without CRC + + var buffer = new byte[HeaderSize - sizeof(uint)]; + ms.Seek(0, SeekOrigin.Begin); + ms.Read(buffer, 0, buffer.Length); + + return BitConverter.ToUInt32(buffer.Sha256(), 0); + } + } + } +} diff --git a/neo/SmartContract/NotifyEventArgs.cs b/neo/SmartContract/NotifyEventArgs.cs index 8fab961408..f4e4e169b8 100644 --- a/neo/SmartContract/NotifyEventArgs.cs +++ b/neo/SmartContract/NotifyEventArgs.cs @@ -1,4 +1,4 @@ -using Neo.Network.P2P.Payloads; +using Neo.Network.P2P.Payloads; using Neo.VM; using System; diff --git a/neo/SmartContract/StackItemType.cs b/neo/SmartContract/StackItemType.cs index b47999e157..94ee4f23ba 100644 --- a/neo/SmartContract/StackItemType.cs +++ b/neo/SmartContract/StackItemType.cs @@ -1,4 +1,4 @@ -namespace Neo.SmartContract +namespace Neo.SmartContract { internal enum StackItemType : byte { diff --git a/neo/SmartContract/StorageContext.cs b/neo/SmartContract/StorageContext.cs index abea2e343d..1c3336c9ac 100644 --- a/neo/SmartContract/StorageContext.cs +++ b/neo/SmartContract/StorageContext.cs @@ -1,4 +1,4 @@ -namespace Neo.SmartContract +namespace Neo.SmartContract { internal class StorageContext { diff --git a/neo/SmartContract/WitnessWrapper.cs b/neo/SmartContract/WitnessWrapper.cs index 28019be0c2..f67690cad5 100644 --- a/neo/SmartContract/WitnessWrapper.cs +++ b/neo/SmartContract/WitnessWrapper.cs @@ -1,4 +1,4 @@ -using Neo.Network.P2P.Payloads; +using Neo.Network.P2P.Payloads; using Neo.Persistence; using System.Linq; diff --git a/neo/UInt160.cs b/neo/UInt160.cs index 0052d45569..0c6bea4b5a 100644 --- a/neo/UInt160.cs +++ b/neo/UInt160.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.Linq; diff --git a/neo/UInt256.cs b/neo/UInt256.cs index 72719f0e90..ec79ae21ea 100644 --- a/neo/UInt256.cs +++ b/neo/UInt256.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.Linq; diff --git a/neo/UIntBase.cs b/neo/UIntBase.cs index af26e36d0a..22431c4cae 100644 --- a/neo/UIntBase.cs +++ b/neo/UIntBase.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using System; using System.IO; using System.Linq; diff --git a/neo/VM/Helper.cs b/neo/VM/Helper.cs index e996463e3f..6a7a37d7d5 100644 --- a/neo/VM/Helper.cs +++ b/neo/VM/Helper.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography.ECC; +using Neo.Cryptography.ECC; using Neo.IO; using Neo.SmartContract; using Neo.VM.Types; diff --git a/neo/Wallets/AssetDescriptor.cs b/neo/Wallets/AssetDescriptor.cs index dca0b10b25..49144834bb 100644 --- a/neo/Wallets/AssetDescriptor.cs +++ b/neo/Wallets/AssetDescriptor.cs @@ -1,4 +1,4 @@ -using Neo.SmartContract; +using Neo.SmartContract; using Neo.VM; using System; diff --git a/neo/Wallets/Helper.cs b/neo/Wallets/Helper.cs index 5960876fe2..4b26982db1 100644 --- a/neo/Wallets/Helper.cs +++ b/neo/Wallets/Helper.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.Network.P2P; using Neo.Network.P2P.Payloads; using System; diff --git a/neo/Wallets/KeyPair.cs b/neo/Wallets/KeyPair.cs index afea8e822a..0125d10f99 100644 --- a/neo/Wallets/KeyPair.cs +++ b/neo/Wallets/KeyPair.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.SmartContract; using System; using System.Linq; diff --git a/neo/Wallets/NEP6/NEP6Account.cs b/neo/Wallets/NEP6/NEP6Account.cs index 990612d542..ddeace2523 100644 --- a/neo/Wallets/NEP6/NEP6Account.cs +++ b/neo/Wallets/NEP6/NEP6Account.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using System; namespace Neo.Wallets.NEP6 diff --git a/neo/Wallets/NEP6/NEP6Contract.cs b/neo/Wallets/NEP6/NEP6Contract.cs index 45f0b5e157..a3dd36f414 100644 --- a/neo/Wallets/NEP6/NEP6Contract.cs +++ b/neo/Wallets/NEP6/NEP6Contract.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Neo.SmartContract; using System.Linq; diff --git a/neo/Wallets/NEP6/NEP6Wallet.cs b/neo/Wallets/NEP6/NEP6Wallet.cs index f76640e886..9f0d0a1315 100644 --- a/neo/Wallets/NEP6/NEP6Wallet.cs +++ b/neo/Wallets/NEP6/NEP6Wallet.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; using Neo.SmartContract; using System; using System.Collections.Generic; diff --git a/neo/Wallets/NEP6/ScryptParameters.cs b/neo/Wallets/NEP6/ScryptParameters.cs index a987159ad6..018f0bfd46 100644 --- a/neo/Wallets/NEP6/ScryptParameters.cs +++ b/neo/Wallets/NEP6/ScryptParameters.cs @@ -1,4 +1,4 @@ -using Neo.IO.Json; +using Neo.IO.Json; namespace Neo.Wallets.NEP6 { diff --git a/neo/Wallets/NEP6/WalletLocker.cs b/neo/Wallets/NEP6/WalletLocker.cs index 45574b5cfe..6f28779361 100644 --- a/neo/Wallets/NEP6/WalletLocker.cs +++ b/neo/Wallets/NEP6/WalletLocker.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Neo.Wallets.NEP6 { diff --git a/neo/Wallets/SQLite/Account.cs b/neo/Wallets/SQLite/Account.cs index ce8ed1e01e..5c91556fb2 100644 --- a/neo/Wallets/SQLite/Account.cs +++ b/neo/Wallets/SQLite/Account.cs @@ -1,4 +1,4 @@ -namespace Neo.Wallets.SQLite +namespace Neo.Wallets.SQLite { internal class Account { diff --git a/neo/Wallets/SQLite/Address.cs b/neo/Wallets/SQLite/Address.cs index a5abe4dcfc..79ef9e1031 100644 --- a/neo/Wallets/SQLite/Address.cs +++ b/neo/Wallets/SQLite/Address.cs @@ -1,4 +1,4 @@ -namespace Neo.Wallets.SQLite +namespace Neo.Wallets.SQLite { internal class Address { diff --git a/neo/Wallets/SQLite/Contract.cs b/neo/Wallets/SQLite/Contract.cs index 96ba3c51a6..a69c0f0968 100644 --- a/neo/Wallets/SQLite/Contract.cs +++ b/neo/Wallets/SQLite/Contract.cs @@ -1,4 +1,4 @@ -namespace Neo.Wallets.SQLite +namespace Neo.Wallets.SQLite { internal class Contract { diff --git a/neo/Wallets/SQLite/Key.cs b/neo/Wallets/SQLite/Key.cs index f493b7310d..97c063a3f2 100644 --- a/neo/Wallets/SQLite/Key.cs +++ b/neo/Wallets/SQLite/Key.cs @@ -1,4 +1,4 @@ -namespace Neo.Wallets.SQLite +namespace Neo.Wallets.SQLite { internal class Key { diff --git a/neo/Wallets/SQLite/UserWallet.cs b/neo/Wallets/SQLite/UserWallet.cs index efb477a61a..df4cccfe08 100644 --- a/neo/Wallets/SQLite/UserWallet.cs +++ b/neo/Wallets/SQLite/UserWallet.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Neo.Cryptography; using Neo.IO; using Neo.SmartContract; diff --git a/neo/Wallets/SQLite/UserWalletAccount.cs b/neo/Wallets/SQLite/UserWalletAccount.cs index d586f59d36..2d3ac74836 100644 --- a/neo/Wallets/SQLite/UserWalletAccount.cs +++ b/neo/Wallets/SQLite/UserWalletAccount.cs @@ -1,4 +1,4 @@ -namespace Neo.Wallets.SQLite +namespace Neo.Wallets.SQLite { internal class UserWalletAccount : WalletAccount { diff --git a/neo/Wallets/SQLite/VerificationContract.cs b/neo/Wallets/SQLite/VerificationContract.cs index 587a0fe468..41f8d44055 100644 --- a/neo/Wallets/SQLite/VerificationContract.cs +++ b/neo/Wallets/SQLite/VerificationContract.cs @@ -1,4 +1,4 @@ -using Neo.IO; +using Neo.IO; using Neo.SmartContract; using Neo.VM; using System; diff --git a/neo/Wallets/SQLite/WalletDataContext.cs b/neo/Wallets/SQLite/WalletDataContext.cs index 6d1ec957a8..cba60cb00d 100644 --- a/neo/Wallets/SQLite/WalletDataContext.cs +++ b/neo/Wallets/SQLite/WalletDataContext.cs @@ -1,4 +1,4 @@ -using Microsoft.Data.Sqlite; +using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; namespace Neo.Wallets.SQLite diff --git a/neo/Wallets/TransferOutput.cs b/neo/Wallets/TransferOutput.cs index 9431f5616d..6e45baa04b 100644 --- a/neo/Wallets/TransferOutput.cs +++ b/neo/Wallets/TransferOutput.cs @@ -1,4 +1,4 @@ -namespace Neo.Wallets +namespace Neo.Wallets { public class TransferOutput { diff --git a/neo/Wallets/Wallet.cs b/neo/Wallets/Wallet.cs index eb816c7a0a..d22c8ff128 100644 --- a/neo/Wallets/Wallet.cs +++ b/neo/Wallets/Wallet.cs @@ -1,4 +1,4 @@ -using Neo.Cryptography; +using Neo.Cryptography; using Neo.IO; using Neo.Ledger; using Neo.Network.P2P.Payloads; diff --git a/neo/Wallets/WalletAccount.cs b/neo/Wallets/WalletAccount.cs index 5e2408a1d0..a427a9e50b 100644 --- a/neo/Wallets/WalletAccount.cs +++ b/neo/Wallets/WalletAccount.cs @@ -1,4 +1,4 @@ -using Neo.SmartContract; +using Neo.SmartContract; namespace Neo.Wallets { diff --git a/neo/neo.csproj b/neo/neo.csproj index 54ba724da9..66e85016bc 100644 --- a/neo/neo.csproj +++ b/neo/neo.csproj @@ -1,4 +1,4 @@ - + 2015-2019 The Neo Project