Exemplo n.º 1
0
 private 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);
 }
Exemplo n.º 2
0
 private 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 > ApplicationEngine.MaxArraySize)
         {
             return(false);
         }
         engine.CurrentContext.EvaluationStack.Push(WitnessWrapper.Create(tx, Snapshot).Select(p => StackItem.FromInterface(p)).ToArray());
         return(true);
     }
     return(false);
 }