Skip to content

Commit

Permalink
Remove GetHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Sep 11, 2019
1 parent 5a4ee76 commit 661b80e
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions neo/SmartContract/InteropService.NEO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ static partial class InteropService
public static readonly uint Neo_Native_Deploy = Register("Neo.Native.Deploy", Native_Deploy, 0, TriggerType.Application);
public static readonly uint Neo_Crypto_CheckSig = Register("Neo.Crypto.CheckSig", Crypto_CheckSig, 0_01000000, TriggerType.All);
public static readonly uint Neo_Crypto_CheckMultiSig = Register("Neo.Crypto.CheckMultiSig", Crypto_CheckMultiSig, GetCheckMultiSigPrice, TriggerType.All);
public static readonly uint Neo_Header_GetVersion = Register("Neo.Header.GetVersion", Header_GetVersion, 0_00000400, TriggerType.Application);
public static readonly uint Neo_Header_GetMerkleRoot = Register("Neo.Header.GetMerkleRoot", Header_GetMerkleRoot, 0_00000400, TriggerType.Application);
public static readonly uint Neo_Header_GetNextConsensus = Register("Neo.Header.GetNextConsensus", Header_GetNextConsensus, 0_00000400, TriggerType.Application);
public static readonly uint Neo_Witness_GetVerificationScript = Register("Neo.Witness.GetVerificationScript", Witness_GetVerificationScript, 0_00000400, TriggerType.All);
public static readonly uint Neo_Account_IsStandard = Register("Neo.Account.IsStandard", Account_IsStandard, 0_00030000, TriggerType.All);
public static readonly uint Neo_Contract_Create = Register("Neo.Contract.Create", Contract_Create, GetDeploymentPrice, TriggerType.Application);
Expand Down Expand Up @@ -155,42 +152,6 @@ private static bool Crypto_CheckMultiSig(ApplicationEngine engine)
return true;
}

private static bool Header_GetVersion(ApplicationEngine engine)
{
if (engine.CurrentContext.EvaluationStack.Pop() is InteropInterface _interface)
{
BlockBase header = _interface.GetInterface<BlockBase>();
if (header == null) return false;
engine.CurrentContext.EvaluationStack.Push(header.Version);
return true;
}
return false;
}

private static bool Header_GetMerkleRoot(ApplicationEngine engine)
{
if (engine.CurrentContext.EvaluationStack.Pop() is InteropInterface _interface)
{
BlockBase header = _interface.GetInterface<BlockBase>();
if (header == null) return false;
engine.CurrentContext.EvaluationStack.Push(header.MerkleRoot.ToArray());
return true;
}
return false;
}

private static bool Header_GetNextConsensus(ApplicationEngine engine)
{
if (engine.CurrentContext.EvaluationStack.Pop() is InteropInterface _interface)
{
BlockBase header = _interface.GetInterface<BlockBase>();
if (header == null) return false;
engine.CurrentContext.EvaluationStack.Push(header.NextConsensus.ToArray());
return true;
}
return false;
}

private static bool Witness_GetVerificationScript(ApplicationEngine engine)
{
if (engine.CurrentContext.EvaluationStack.Pop() is InteropInterface _interface)
Expand Down

0 comments on commit 661b80e

Please sign in to comment.