From 237fb246822ace40a1a44fd869efd7a6a3097aca Mon Sep 17 00:00:00 2001 From: Shargon Date: Tue, 21 Jan 2020 18:35:47 +0100 Subject: [PATCH 1/6] Remove parallel --- src/neo/Ledger/Blockchain.cs | 39 +++---------------- src/neo/Ledger/MemoryPool.cs | 2 +- src/neo/Network/P2P/Payloads/Transaction.cs | 16 +------- tests/neo.UnitTests/Ledger/UT_MemoryPool.cs | 2 - .../Ledger/UT_SendersFeeMonitor.cs | 1 - .../Network/P2P/Payloads/UT_Transaction.cs | 2 +- 6 files changed, 10 insertions(+), 52 deletions(-) diff --git a/src/neo/Ledger/Blockchain.cs b/src/neo/Ledger/Blockchain.cs index 9090a5b339..cbdb34e45d 100644 --- a/src/neo/Ledger/Blockchain.cs +++ b/src/neo/Ledger/Blockchain.cs @@ -27,7 +27,6 @@ public class Import { public IEnumerable Blocks; public bool Verify = tru public class ImportCompleted { } public class FillMemoryPool { public IEnumerable Transactions; } public class FillCompleted { } - private class ParallelVerified { public Transaction Transaction; public bool ShouldRelay; public RelayResultReason VerifyResult; } public static readonly uint MillisecondsPerBlock = ProtocolSettings.Default.MillisecondsPerBlock; public const uint DecrementInterval = 2000000; @@ -402,44 +401,21 @@ private void OnNewHeaders(Header[] headers) private void OnNewTransaction(Transaction transaction, bool relay) { RelayResultReason reason; - if (ContainsTransaction(transaction.Hash)) + if (View.ContainsTransaction(transaction.Hash)) reason = RelayResultReason.AlreadyExists; else if (!MemPool.CanTransactionFitInPool(transaction)) reason = RelayResultReason.OutOfMemory; else - reason = transaction.VerifyForEachBlock(currentSnapshot, MemPool.SendersFeeMonitor.GetSenderFee(transaction.Sender)); - if (reason == RelayResultReason.Succeed) - { - Task.Run(() => - { - return new ParallelVerified - { - Transaction = transaction, - ShouldRelay = relay, - VerifyResult = transaction.VerifyParallelParts(currentSnapshot) - }; - }).PipeTo(Self, Sender); - } - else - { - Sender.Tell(reason); - } - } + reason = transaction.Verify(currentSnapshot, MemPool.SendersFeeMonitor.GetSenderFee(transaction.Sender)); - private void OnParallelVerified(ParallelVerified parallelVerified) - { - RelayResultReason reason = parallelVerified.VerifyResult; if (reason == RelayResultReason.Succeed) { - if (View.ContainsTransaction(parallelVerified.Transaction.Hash)) - reason = RelayResultReason.AlreadyExists; - else if (!MemPool.CanTransactionFitInPool(parallelVerified.Transaction)) + if (!MemPool.TryAdd(transaction.Hash, transaction)) reason = RelayResultReason.OutOfMemory; - else if (!MemPool.TryAdd(parallelVerified.Transaction.Hash, parallelVerified.Transaction)) - reason = RelayResultReason.OutOfMemory; - else if (parallelVerified.ShouldRelay) - system.LocalNode.Tell(new LocalNode.RelayDirectly { Inventory = parallelVerified.Transaction }); + else if (relay) + system.LocalNode.Tell(new LocalNode.RelayDirectly { Inventory = transaction }); } + Sender.Tell(reason); } @@ -475,9 +451,6 @@ protected override void OnReceive(object message) case Transaction transaction: OnNewTransaction(transaction, true); break; - case ParallelVerified parallelVerified: - OnParallelVerified(parallelVerified); - break; case ConsensusPayload payload: Sender.Tell(OnNewConsensus(payload)); break; diff --git a/src/neo/Ledger/MemoryPool.cs b/src/neo/Ledger/MemoryPool.cs index f0409b9e54..45455b032d 100644 --- a/src/neo/Ledger/MemoryPool.cs +++ b/src/neo/Ledger/MemoryPool.cs @@ -416,7 +416,7 @@ private int ReverifyTransactions(SortedSet verifiedSortedTxPool, // Since unverifiedSortedTxPool is ordered in an ascending manner, we take from the end. foreach (PoolItem item in unverifiedSortedTxPool.Reverse().Take(count)) { - if (item.Tx.VerifyForEachBlock(snapshot, SendersFeeMonitor.GetSenderFee(item.Tx.Sender)) == RelayResultReason.Succeed) + if (item.Tx.Verify(snapshot, SendersFeeMonitor.GetSenderFee(item.Tx.Sender)) == RelayResultReason.Succeed) { reverifiedItems.Add(item); SendersFeeMonitor.AddSenderFee(item.Tx); diff --git a/src/neo/Network/P2P/Payloads/Transaction.cs b/src/neo/Network/P2P/Payloads/Transaction.cs index 2b6523a6aa..756e955573 100644 --- a/src/neo/Network/P2P/Payloads/Transaction.cs +++ b/src/neo/Network/P2P/Payloads/Transaction.cs @@ -267,16 +267,11 @@ bool IInventory.Verify(StoreView snapshot) } public virtual RelayResultReason Verify(StoreView snapshot, BigInteger totalSenderFeeFromPool) - { - RelayResultReason result = VerifyForEachBlock(snapshot, totalSenderFeeFromPool); - if (result != RelayResultReason.Succeed) return result; - return VerifyParallelParts(snapshot); - } - - public virtual RelayResultReason VerifyForEachBlock(StoreView snapshot, BigInteger totalSenderFeeFromPool) { if (ValidUntilBlock <= snapshot.Height || ValidUntilBlock > snapshot.Height + MaxValidUntilBlockIncrement) return RelayResultReason.Expired; + int size = Size; + if (size > MaxTransactionSize) return RelayResultReason.Invalid; UInt160[] hashes = GetScriptHashesForVerifying(snapshot); if (NativeContract.Policy.GetBlockedAccounts(snapshot).Intersect(hashes).Any()) return RelayResultReason.PolicyFail; @@ -289,13 +284,6 @@ public virtual RelayResultReason VerifyForEachBlock(StoreView snapshot, BigInteg if (Witnesses[i].VerificationScript.Length > 0) continue; if (snapshot.Contracts.TryGet(hashes[i]) is null) return RelayResultReason.Invalid; } - return RelayResultReason.Succeed; - } - - public RelayResultReason VerifyParallelParts(StoreView snapshot) - { - int size = Size; - if (size > MaxTransactionSize) return RelayResultReason.Invalid; long net_fee = NetworkFee - size * NativeContract.Policy.GetFeePerByte(snapshot); if (net_fee < 0) return RelayResultReason.InsufficientFunds; if (!this.VerifyWitnesses(snapshot, net_fee)) return RelayResultReason.Invalid; diff --git a/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs b/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs index 38a456bcf3..e238b90256 100644 --- a/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs +++ b/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs @@ -74,7 +74,6 @@ private Transaction CreateTransactionWithFee(long fee) var randomBytes = new byte[16]; random.NextBytes(randomBytes); Mock mock = new Mock(); - mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = UInt160.Zero; @@ -99,7 +98,6 @@ private Transaction CreateTransactionWithFeeAndBalanceVerify(long fee) random.NextBytes(randomBytes); Mock mock = new Mock(); UInt160 sender = UInt160.Zero; - mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns((StoreView snapshot, BigInteger amount) => NativeContract.GAS.BalanceOf(snapshot, sender) >= amount + fee ? RelayResultReason.Succeed : RelayResultReason.InsufficientFunds); mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = sender; diff --git a/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs b/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs index 6268fa0fde..46d518b4e6 100644 --- a/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs +++ b/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs @@ -18,7 +18,6 @@ private Transaction CreateTransactionWithFee(long networkFee, long systemFee) var randomBytes = new byte[16]; random.NextBytes(randomBytes); Mock mock = new Mock(); - mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = UInt160.Zero; diff --git a/tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs b/tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs index 679103a470..830f7cd183 100644 --- a/tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs +++ b/tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs @@ -806,7 +806,7 @@ public void Transaction_Reverify_Hashes_Length_Unequal_To_Witnesses_Length() }; UInt160[] hashes = txSimple.GetScriptHashesForVerifying(snapshot); Assert.AreEqual(2, hashes.Length); - Assert.AreNotEqual(RelayResultReason.Succeed, txSimple.VerifyForEachBlock(snapshot, BigInteger.Zero)); + Assert.AreNotEqual(RelayResultReason.Succeed, txSimple.Verify(snapshot, BigInteger.Zero)); } [TestMethod] From 6abf569a88fb7c5ee1415badf84c004fcf052876 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 21 Feb 2020 09:03:18 +0100 Subject: [PATCH 2/6] Recover VerifyForEachBlock --- src/neo/Ledger/MemoryPool.cs | 2 +- src/neo/Network/P2P/Payloads/Transaction.cs | 18 +++++++++++++----- tests/neo.UnitTests/Ledger/UT_MemoryPool.cs | 4 ++-- .../Ledger/UT_SendersFeeMonitor.cs | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/neo/Ledger/MemoryPool.cs b/src/neo/Ledger/MemoryPool.cs index 45455b032d..f0409b9e54 100644 --- a/src/neo/Ledger/MemoryPool.cs +++ b/src/neo/Ledger/MemoryPool.cs @@ -416,7 +416,7 @@ private int ReverifyTransactions(SortedSet verifiedSortedTxPool, // Since unverifiedSortedTxPool is ordered in an ascending manner, we take from the end. foreach (PoolItem item in unverifiedSortedTxPool.Reverse().Take(count)) { - if (item.Tx.Verify(snapshot, SendersFeeMonitor.GetSenderFee(item.Tx.Sender)) == RelayResultReason.Succeed) + if (item.Tx.VerifyForEachBlock(snapshot, SendersFeeMonitor.GetSenderFee(item.Tx.Sender)) == RelayResultReason.Succeed) { reverifiedItems.Add(item); SendersFeeMonitor.AddSenderFee(item.Tx); diff --git a/src/neo/Network/P2P/Payloads/Transaction.cs b/src/neo/Network/P2P/Payloads/Transaction.cs index 756e955573..2d34a535c7 100644 --- a/src/neo/Network/P2P/Payloads/Transaction.cs +++ b/src/neo/Network/P2P/Payloads/Transaction.cs @@ -268,10 +268,21 @@ bool IInventory.Verify(StoreView snapshot) public virtual RelayResultReason Verify(StoreView snapshot, BigInteger totalSenderFeeFromPool) { - if (ValidUntilBlock <= snapshot.Height || ValidUntilBlock > snapshot.Height + MaxValidUntilBlockIncrement) - return RelayResultReason.Expired; + RelayResultReason result = VerifyForEachBlock(snapshot, totalSenderFeeFromPool); + if (result != RelayResultReason.Succeed) return result; + int size = Size; if (size > MaxTransactionSize) return RelayResultReason.Invalid; + long net_fee = NetworkFee - size * NativeContract.Policy.GetFeePerByte(snapshot); + if (net_fee < 0) return RelayResultReason.InsufficientFunds; + if (!this.VerifyWitnesses(snapshot, net_fee)) return RelayResultReason.Invalid; + return RelayResultReason.Succeed; + } + + public virtual RelayResultReason VerifyForEachBlock(StoreView snapshot, BigInteger totalSenderFeeFromPool) + { + if (ValidUntilBlock <= snapshot.Height || ValidUntilBlock > snapshot.Height + MaxValidUntilBlockIncrement) + return RelayResultReason.Expired; UInt160[] hashes = GetScriptHashesForVerifying(snapshot); if (NativeContract.Policy.GetBlockedAccounts(snapshot).Intersect(hashes).Any()) return RelayResultReason.PolicyFail; @@ -284,9 +295,6 @@ public virtual RelayResultReason Verify(StoreView snapshot, BigInteger totalSend if (Witnesses[i].VerificationScript.Length > 0) continue; if (snapshot.Contracts.TryGet(hashes[i]) is null) return RelayResultReason.Invalid; } - long net_fee = NetworkFee - size * NativeContract.Policy.GetFeePerByte(snapshot); - if (net_fee < 0) return RelayResultReason.InsufficientFunds; - if (!this.VerifyWitnesses(snapshot, net_fee)) return RelayResultReason.Invalid; return RelayResultReason.Succeed; } diff --git a/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs b/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs index 1a8ff0cf77..923aebd747 100644 --- a/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs +++ b/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs @@ -74,7 +74,7 @@ private Transaction CreateTransactionWithFee(long fee) var randomBytes = new byte[16]; random.NextBytes(randomBytes); Mock mock = new Mock(); - mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); + mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = UInt160.Zero; mock.Object.NetworkFee = fee; @@ -98,7 +98,7 @@ private Transaction CreateTransactionWithFeeAndBalanceVerify(long fee) random.NextBytes(randomBytes); Mock mock = new Mock(); UInt160 sender = UInt160.Zero; - mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); + mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = sender; mock.Object.NetworkFee = fee; diff --git a/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs b/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs index 46d518b4e6..4da44310f6 100644 --- a/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs +++ b/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs @@ -18,7 +18,7 @@ private Transaction CreateTransactionWithFee(long networkFee, long systemFee) var randomBytes = new byte[16]; random.NextBytes(randomBytes); Mock mock = new Mock(); - mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); + mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = UInt160.Zero; mock.Object.NetworkFee = networkFee; From 59ab161e20775e6f8cb3f630fb67f092c2a1b3b7 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 21 Feb 2020 09:06:52 +0100 Subject: [PATCH 3/6] Reduce changes --- src/neo/Ledger/Blockchain.cs | 2 +- tests/neo.UnitTests/Ledger/UT_MemoryPool.cs | 4 +++- tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/neo/Ledger/Blockchain.cs b/src/neo/Ledger/Blockchain.cs index cbdb34e45d..65bba7bee0 100644 --- a/src/neo/Ledger/Blockchain.cs +++ b/src/neo/Ledger/Blockchain.cs @@ -401,7 +401,7 @@ private void OnNewHeaders(Header[] headers) private void OnNewTransaction(Transaction transaction, bool relay) { RelayResultReason reason; - if (View.ContainsTransaction(transaction.Hash)) + if (ContainsTransaction(transaction.Hash)) reason = RelayResultReason.AlreadyExists; else if (!MemPool.CanTransactionFitInPool(transaction)) reason = RelayResultReason.OutOfMemory; diff --git a/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs b/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs index 923aebd747..86ad694641 100644 --- a/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs +++ b/tests/neo.UnitTests/Ledger/UT_MemoryPool.cs @@ -75,6 +75,7 @@ private Transaction CreateTransactionWithFee(long fee) random.NextBytes(randomBytes); Mock mock = new Mock(); mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); + mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = UInt160.Zero; mock.Object.NetworkFee = fee; @@ -98,7 +99,8 @@ private Transaction CreateTransactionWithFeeAndBalanceVerify(long fee) random.NextBytes(randomBytes); Mock mock = new Mock(); UInt160 sender = UInt160.Zero; - mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); + mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns((StoreView snapshot, BigInteger amount) => NativeContract.GAS.BalanceOf(snapshot, sender) >= amount + fee ? RelayResultReason.Succeed : RelayResultReason.InsufficientFunds); + mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = sender; mock.Object.NetworkFee = fee; diff --git a/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs b/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs index 4da44310f6..6268fa0fde 100644 --- a/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs +++ b/tests/neo.UnitTests/Ledger/UT_SendersFeeMonitor.cs @@ -19,6 +19,7 @@ private Transaction CreateTransactionWithFee(long networkFee, long systemFee) random.NextBytes(randomBytes); Mock mock = new Mock(); mock.Setup(p => p.VerifyForEachBlock(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); + mock.Setup(p => p.Verify(It.IsAny(), It.IsAny())).Returns(RelayResultReason.Succeed); mock.Object.Script = randomBytes; mock.Object.Sender = UInt160.Zero; mock.Object.NetworkFee = networkFee; From f66cfe652d7dbfdeea7ef744cdd07d4c0757cbd5 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 21 Feb 2020 09:08:06 +0100 Subject: [PATCH 4/6] Reduce changes --- tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs b/tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs index 830f7cd183..679103a470 100644 --- a/tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs +++ b/tests/neo.UnitTests/Network/P2P/Payloads/UT_Transaction.cs @@ -806,7 +806,7 @@ public void Transaction_Reverify_Hashes_Length_Unequal_To_Witnesses_Length() }; UInt160[] hashes = txSimple.GetScriptHashesForVerifying(snapshot); Assert.AreEqual(2, hashes.Length); - Assert.AreNotEqual(RelayResultReason.Succeed, txSimple.Verify(snapshot, BigInteger.Zero)); + Assert.AreNotEqual(RelayResultReason.Succeed, txSimple.VerifyForEachBlock(snapshot, BigInteger.Zero)); } [TestMethod] From 6914e2973b1d29a4f578001284a60fefd4a90dae Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 21 Feb 2020 09:35:19 +0100 Subject: [PATCH 5/6] Move method down --- src/neo/Network/P2P/Payloads/Transaction.cs | 27 ++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/neo/Network/P2P/Payloads/Transaction.cs b/src/neo/Network/P2P/Payloads/Transaction.cs index 2d34a535c7..ba79b71963 100644 --- a/src/neo/Network/P2P/Payloads/Transaction.cs +++ b/src/neo/Network/P2P/Payloads/Transaction.cs @@ -266,19 +266,6 @@ bool IInventory.Verify(StoreView snapshot) return Verify(snapshot, BigInteger.Zero) == RelayResultReason.Succeed; } - public virtual RelayResultReason Verify(StoreView snapshot, BigInteger totalSenderFeeFromPool) - { - RelayResultReason result = VerifyForEachBlock(snapshot, totalSenderFeeFromPool); - if (result != RelayResultReason.Succeed) return result; - - int size = Size; - if (size > MaxTransactionSize) return RelayResultReason.Invalid; - long net_fee = NetworkFee - size * NativeContract.Policy.GetFeePerByte(snapshot); - if (net_fee < 0) return RelayResultReason.InsufficientFunds; - if (!this.VerifyWitnesses(snapshot, net_fee)) return RelayResultReason.Invalid; - return RelayResultReason.Succeed; - } - public virtual RelayResultReason VerifyForEachBlock(StoreView snapshot, BigInteger totalSenderFeeFromPool) { if (ValidUntilBlock <= snapshot.Height || ValidUntilBlock > snapshot.Height + MaxValidUntilBlockIncrement) @@ -297,7 +284,19 @@ public virtual RelayResultReason VerifyForEachBlock(StoreView snapshot, BigInteg } return RelayResultReason.Succeed; } - + + public virtual RelayResultReason Verify(StoreView snapshot, BigInteger totalSenderFeeFromPool) + { + RelayResultReason result = VerifyForEachBlock(snapshot, totalSenderFeeFromPool); + if (result != RelayResultReason.Succeed) return result; + int size = Size; + if (size > MaxTransactionSize) return RelayResultReason.Invalid; + long net_fee = NetworkFee - size * NativeContract.Policy.GetFeePerByte(snapshot); + if (net_fee < 0) return RelayResultReason.InsufficientFunds; + if (!this.VerifyWitnesses(snapshot, net_fee)) return RelayResultReason.Invalid; + return RelayResultReason.Succeed; + } + public StackItem ToStackItem(ReferenceCounter referenceCounter) { return new Array(referenceCounter, new StackItem[] From 7378e9af9210e8689a709999d2129aefc886179f Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 21 Feb 2020 09:36:28 +0100 Subject: [PATCH 6/6] Clean spaces --- src/neo/Network/P2P/Payloads/Transaction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/neo/Network/P2P/Payloads/Transaction.cs b/src/neo/Network/P2P/Payloads/Transaction.cs index ba79b71963..e511e17c94 100644 --- a/src/neo/Network/P2P/Payloads/Transaction.cs +++ b/src/neo/Network/P2P/Payloads/Transaction.cs @@ -284,7 +284,7 @@ public virtual RelayResultReason VerifyForEachBlock(StoreView snapshot, BigInteg } return RelayResultReason.Succeed; } - + public virtual RelayResultReason Verify(StoreView snapshot, BigInteger totalSenderFeeFromPool) { RelayResultReason result = VerifyForEachBlock(snapshot, totalSenderFeeFromPool); @@ -296,7 +296,7 @@ public virtual RelayResultReason Verify(StoreView snapshot, BigInteger totalSend if (!this.VerifyWitnesses(snapshot, net_fee)) return RelayResultReason.Invalid; return RelayResultReason.Succeed; } - + public StackItem ToStackItem(ReferenceCounter referenceCounter) { return new Array(referenceCounter, new StackItem[]