I am working on a contract that lets player place wagers against one another.
I have a struct which looks like this that holds all the wagers
struct Wager { address player1; address player2: uint amount; } Wager[] public wagers;
struct Wager {
address player1;
address player2:
uint amount;
}
Wager[] public wagers;
after a wager is set an a winner declared I wanted to remove the wager from this array since it is no longer needed and I have no interest in having a history of wagers. I'm also unsure of the effect of this array growing very large in size if there are lots of continuous wagers being made.
Does anyone know of the proper mechanism for removing elements from an array for a case like this?
Thank help is appreciated! Thank You!