public StackItem ToStackItem() { return(new VM.Types.Array ( new StackItem[] { // Computed properties new ByteArray(Hash.ToArray()), // BlockBase properties new Integer(Version), new ByteArray(PrevHash.ToArray()), new ByteArray(MerkleRoot.ToArray()), new Integer(Timestamp), new Integer(Index), new ByteArray(NextConsensus.ToArray()), // Witness // Block properties // Count // ConsensusData new Integer(Transactions.Length) } )); }
StackItem IInteroperable.ToStackItem(ReferenceCounter referenceCounter) { return(new VM.Types.Array(referenceCounter, new StackItem[] { // Computed properties Hash.ToArray(), // BlockBase properties Version, PrevHash.ToArray(), MerkleRoot.ToArray(), Timestamp, Index, NextConsensus.ToArray(), // Block properties Hashes.Length - 1 })); }
public StackItem ToStackItem(ReferenceCounter referenceCounter) { return(new Array(referenceCounter, new StackItem[] { // Computed properties Hash.ToArray(), // BlockBase properties Version, PrevHash.ToArray(), MerkleRoot.ToArray(), Timestamp, Index, NextConsensus.ToArray(), // Block properties Transactions.Length })); }