The problem with your idea is simple: Anyone who wants to monitor you can initiate a connection to you, and see if you broadcast the transaction first.
There are other issues, as a simple Diffie-Hellman key agreement is unauthenticated. It's trivial to MITM you and relay the communications with another client without you even knowing. You're assuming the attacker only has the ability to sniff packets and not alter them or get in the middle (or just connect to you!).