Does that matter? If someone tried to sell state secrets to another country and their buyer turned out to be a CIA agent undercover and the secrets were fake info planted for them to sell, they still likely will be prosecuted for treason despite all that.