I have an Auction contract which has a function like this:
function bid() payable{
//calculate and store highest bid value
}
But because each transaction takes time to mine, so when a user bids the highest amount, the highest bid displayed for other users takes time to be updated, which is undesirable because other users can't know what is the current minimum amount they have to bid to win.
So what should be a good solution to this problem? I thought of storing a highest bid variable in the server side that get updated whenever a user bids, but this could run into a problem when the transaction is canceled or violates something and reverted.