I have the following struct defined as a state variable and conditionally set at runtime.
Transaction private tx;
struct Transaction {
address to;
uint value;
bytes data;
}
I would like to check if the variable was set before executing a specific portion of my code.
if(tx == ??????){
//do something
}
What's the best way to check if the struct is set?
Edit: It is important to note that here the struct is not stored in a mapping. Similar questions on this stackexchange are asking for structs in mapping, here this is not the case.