Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Zhang committed Jul 20, 2017
1 parent 86e3a0e commit f0ca8db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 0 additions & 2 deletions neo/Core/InvocationTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public override JObject ToJson()

public override bool Verify(IEnumerable<Transaction> mempool)
{
// Not available in MAINNET until tested
if (Settings.Default.Magic != 1953787457) return false;
if (Gas.GetData() % 100000000 != 0) return false;
return base.Verify(mempool);
}
Expand Down
3 changes: 2 additions & 1 deletion neo/Core/IssueTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public override Fixed8 SystemFee
{
get
{
if (Version >= 1) return Fixed8.Zero;
if (Outputs.All(p => p.AssetId == Blockchain.SystemShare.Hash || p.AssetId == Blockchain.SystemCoin.Hash))
return Fixed8.Zero;
return base.SystemFee;
Expand All @@ -30,7 +31,7 @@ public IssueTransaction()

protected override void DeserializeExclusiveData(BinaryReader reader)
{
if (Version != 0) throw new FormatException();
if (Version > 1) throw new FormatException();
}

/// <summary>
Expand Down
12 changes: 6 additions & 6 deletions neo/Network/LocalNode.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Neo.Core;
using Neo.IO;
using Neo.IO.Caching;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Neo.Core;
using Neo.IO;
using Neo.IO.Caching;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
Expand Down Expand Up @@ -460,7 +460,7 @@ private void RemoteNode_Disconnected(object sender, bool error)

private void RemoteNode_InventoryReceived(object sender, IInventory inventory)
{
if (inventory is Transaction)
if (inventory is Transaction tx && tx.Type != TransactionType.ClaimTransaction && tx.Type != TransactionType.IssueTransaction)
{
if (Blockchain.Default == null) return;
lock (KnownHashes)
Expand All @@ -472,7 +472,7 @@ private void RemoteNode_InventoryReceived(object sender, IInventory inventory)
if (args.Cancel) return;
lock (temp_pool)
{
temp_pool.Add((Transaction)inventory);
temp_pool.Add(tx);
}
new_tx_event.Set();
}
Expand Down

0 comments on commit f0ca8db

Please sign in to comment.