Example #1
0
        UInt160[] IVerifiable.GetScriptHashesForVerifying(DataCache snapshot)
        {
            if (PrevHash == UInt256.Zero)
            {
                return new[] { Witness.ScriptHash }
            }
            ;
            BlockBase prev = Blockchain.Singleton.HeaderCache[Index - 1] ?? (BlockBase)NativeContract.Ledger.GetTrimmedBlock(snapshot, PrevHash);

            if (prev is null)
            {
                throw new InvalidOperationException();
            }
            return(new[] { prev.NextConsensus });
        }