roller: don't set :frequency timer on commit

This commit is contained in:
yosoyubik 2021-12-14 16:39:22 +01:00
parent d0309abfd8
commit 5d4a410653

View File

@ -481,7 +481,7 @@
?+ wire (on-arvo:def wire sign-arvo) ?+ wire (on-arvo:def wire sign-arvo)
[%timer ~] [%timer ~]
?+ +<.sign-arvo (on-arvo:def wire sign-arvo) ?+ +<.sign-arvo (on-arvo:def wire sign-arvo)
%wake =^(cards state on-timer:do [cards this]) %wake =^(cards state (on-timer:do &) [cards this])
== ==
[%quota-timer ~] [%quota-timer ~]
?+ +<.sign-arvo (on-arvo:def wire sign-arvo) ?+ +<.sign-arvo (on-arvo:def wire sign-arvo)
@ -835,7 +835,7 @@
=+ local=(team:title our.bowl src.bowl) =+ local=(team:title our.bowl src.bowl)
|^ |^
?- -.action ?- -.action
%commit ?>(local on-timer) %commit ?>(local (on-timer |))
%config ?>(local (on-config +.action)) %config ?>(local (on-config +.action))
%assign ?>(local `state(allowances (~(put by allowances) +.action))) %assign ?>(local `state(allowances (~(put by allowances) +.action)))
%refuel ?>(local (refuel-tx +.action)) %refuel ?>(local (refuel-tx +.action))
@ -1004,6 +1004,7 @@
:: +on-timer: every :frequency, freeze :pending txs roll and start sending it :: +on-timer: every :frequency, freeze :pending txs roll and start sending it
:: ::
++ on-timer ++ on-timer
|= new=?
^- (quip card _state) ^- (quip card _state)
=^ updates-1 state =^ updates-1 state
(predicted-state canonical) (predicted-state canonical)
@ -1044,8 +1045,10 @@
(emit updates-2) (emit updates-2)
(send-roll address nonce) (send-roll address nonce)
== ==
=^ card next-batch (set-roller:timer frequency now.bowl) ?. new cards^state
[[card cards] state] =^ card next-batch
(set-roller:timer frequency now.bowl)
[card cards]^state
:: +on-quota-timer: resets tx quota for all ships :: +on-quota-timer: resets tx quota for all ships
:: ::
++ on-quota-timer ++ on-quota-timer