simpler expression for random diffusion

This commit is contained in:
Denis Ryabov 2014-07-08 15:19:56 +04:00
parent 847659f7dd
commit 785d05f10c

View File

@ -616,8 +616,8 @@ bool node_impl::refresh_storage() {
--refresh_per_tick_limit;
// add 10% diffusion to next refresh time
item.next_refresh_time = now + minutes(item.confirmed ? 60 : 1) * (1. + 0.1 * (2. * getRandom() - 1.));
// add +/-10% diffusion to next refresh time
item.next_refresh_time = now + minutes(item.confirmed ? 60 : 1) * ( 0.9 + 0.2 * getRandom() );
}
}