Skip to content

Commit

Permalink
Fix MaxBlockSystemFee (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang authored Dec 2, 2022
1 parent 0cd622d commit ee0c02b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/DBFTPlugin/DBFTPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Akka.Actor;
using Neo.ConsoleService;
using Neo.Network.P2P;
using Neo.Network.P2P.Payloads;
using Neo.Plugins;
using Neo.Wallets;

Expand Down Expand Up @@ -87,7 +88,12 @@ public void Start(Wallet wallet)
private bool RemoteNode_MessageReceived(NeoSystem system, Message message)
{
if (message.Command == MessageCommand.Transaction)
consensus?.Tell(message.Payload);
{
Transaction tx = (Transaction)message.Payload;
if (tx.SystemFee > settings.MaxBlockSystemFee)
return false;
consensus?.Tell(tx);
}
return true;
}
}
Expand Down

0 comments on commit ee0c02b

Please sign in to comment.