Skip to content

Commit

Permalink
Fix VerifyWitnesses() of native contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Oct 11, 2020
1 parent 15b74bc commit fcf8fc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/neo/SmartContract/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Neo.Network.P2P.Payloads;
using Neo.Persistence;
using Neo.SmartContract.Manifest;
using Neo.SmartContract.Native;
using Neo.VM;
using System;
using System.Buffers.Binary;
Expand Down Expand Up @@ -169,6 +170,7 @@ internal static bool VerifyWitnesses(this IVerifiable verifiable, StoreView snap
}
else
{
if (NativeContract.IsNative(hashes[i])) return false;
if (hashes[i] != verifiable.Witnesses[i].ScriptHash) return false;
offset = 0;
}
Expand Down

0 comments on commit fcf8fc3

Please sign in to comment.