I have two structs
struct Vote {
address from;
uint256 rep;
bool vote;
}
struct Pool {
address from;
string tokenSymbol;
string name;
uint256 timeout;
string evidence;
Vote[] votes;
}
mapping(uint256 => Pool) validationPool;
How do I initialize an empty array of votes while creating a new Pool Struct?
validationPool[proposalIndex] = Pool({
from: msg.sender, tokenSymbol:_tokenSymbol,
name:_name,
timeout: now + 180,
evidence:_evidence,
votes: new Vote[](0) });
I see the compilation error :
UnimplementedFeatureError: Copying of type struct DemoContract.Vote memory[] memory to storage not yet supported. What does it mean and how do I initialize an array of structs inside another struct?