def dump_packet(cls, data): """ 4-byte synchronisation token, (0x22400891), a 4-byte "payload size", to be interpreted as a big-endian integer an N-byte RLP-serialised data structure """ payload = rlp.encode(recursive_int_to_big_endian(data)) packet = ienc4(cls.SYNCHRONIZATION_TOKEN) packet += ienc4(len(payload)) packet += payload return packet