Added required total to sum transaction demo

Also made it tolerate slight inaccuracies in sum, to avoid endless
reaction cycle due to double inaccuracies.