def binary(self, magic):
        'Returns the binary representation of the message.'

        payload = format.CompoundType.binary(self)

        checksum = hashlib.sha256(hashlib.sha256(payload).digest()).digest()[:4]

        # pad the command
        command = self.command + (chr(0) * (len(self.command) - 12))

        # header + payload
        return magic + command + struct.pack('<I', len(payload)) + checksum + payload
dataset/ETHPy150Open ricmoo/pycoind/pycoind/protocol/messages.py/Message.binary/swapped operands of `-`