I'm neither a man of math nor code, so plz don't crucify me if there is something wrong. Since I wrote it I'm asking at several places for feedback, but nobody gave it until now. Maybe you can help me?
http://js.do/code/156684Hello i don't like this lines:
var mbsw = 1000 * m * n;
var mbnsw = 1000 - mbsw + 0.1 * 1000 * m;
var mbbw = mbnsw * 4 + mbsw;
You created 2 excess variables ( mbsw and mbnsw) which don't affect on the result.
In fact it would be better to create two methods (first with cycle and calculations and second with text data)
Also, Segwitt don't create 4 mb blocks as i know. blocks still the same.