sync_with_ping() only guarantees that the node has processed messages
it's received from the peer, not that block announcements from the node have
made it back to the peer. Replace sync_with_ping() with an explicit check that
the node's tip has been announced.
Python lambda use was incorrect.
sendcmpct messages need to be synchronized with RPC calls to generate().
Headers need to be synced (eg with getheaders) for cmpctblock announcements
to start.
Last test omitted sending a sendcmpct message.