mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-09 06:18:02 +00:00
simpler expression for random diffusion
This commit is contained in:
parent
847659f7dd
commit
785d05f10c
@ -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() );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user