roller: bugfix for adding failed txs to history

This commit is contained in:
yosoyubik 2021-11-01 10:09:11 +01:00
parent 27576e272b
commit 2bb218cfc8

View File

@ -738,15 +738,17 @@
%+ snoc nups
[%tx address.tx roll-tx(status %failed)]
=? valid gud [tx valid]
=? finding !gud (~(put by finding) keccak %failed)
=? history !gud
=+ wer=(~(got by finding) keccak)
?> ?=(^ wer)
=/ =time
?: ?=(%pending type) time.tx
=+ wer=(~(got by finding) keccak)
?>(?=(^ wer) time.wer)
=+ txs=(~(got by history) address.tx)
=. txs +:(del:orh txs time.wer)
=. txs +:(del:orh txs time)
%+ ~(put by history) address.tx
%+ put:orh txs
[time.wer roll-tx(status %failed)]
[time roll-tx(status %failed)]
=? finding !gud (~(put by finding) keccak %failed)
$(txs t.txs, ups (weld ups nups))
::
++ try-apply