Ejemplo n.º 1
0
 protected bool Witness_GetVerificationScript(ExecutionEngine engine)
 {
     if (engine.CurrentContext.EvaluationStack.Pop() is InteropInterface _interface)
     {
         WitnessWrapper witness = _interface.GetInterface <WitnessWrapper>();
         if (witness == null)
         {
             return(false);
         }
         engine.CurrentContext.EvaluationStack.Push(witness.VerificationScript);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
 protected bool Transaction_GetWitnesses(ExecutionEngine engine)
 {
     if (engine.CurrentContext.EvaluationStack.Pop() is InteropInterface _interface)
     {
         Transaction tx = _interface.GetInterface <Transaction>();
         if (tx == null)
         {
             return(false);
         }
         if (tx.Witnesses.Length > engine.MaxArraySize)
         {
             return(false);
         }
         engine.CurrentContext.EvaluationStack.Push(WitnessWrapper.Create(tx, Snapshot).Select(p => StackItem.FromInterface(p)).ToArray());
         return(true);
     }
     return(false);
 }