示例#1
0
文件: block.py 项目: EdgeDLT/neo3-boa
 def deserialize_unsigned(self, reader: serialization.BinaryReader) -> None:
     self.version = reader.read_uint32()
     self.prev_hash = reader.read_serializable(types.UInt256)
     self.merkle_root = reader.read_serializable(types.UInt256)
     self.timestamp = reader.read_uint64()
     self.index = reader.read_uint32()
     self.next_consensus = reader.read_serializable(types.UInt160)
示例#2
0
    def deserialize(self, reader: serialization.BinaryReader) -> None:
        """
        Deserialize the object from a binary stream.

        Args:
            reader: instance.
        """
        self.primary_index = reader.read_var_int(max=1024)  # comes from C#'s Clockchain.MaxValidators
        self.nonce = reader.read_uint64()