Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Two calls in succession, inBlockEvents "cannot regress" error #1194

Open
VadimSaveljev opened this issue Jul 17, 2023 · 1 comment
Open

Two calls in succession, inBlockEvents "cannot regress" error #1194

VadimSaveljev opened this issue Jul 17, 2023 · 1 comment
Labels
bug Something is broken

Comments

@VadimSaveljev
Copy link
Contributor

I'm trying to use two capi calls in succession
first is creating nft collection
second is setting metadata for that collection

I need to make these calls separately, because first call generates collection ID, which I take and set the metadata

so for maximum speed I'm utilising inBlockEvents
which allows to get the ID very fast without waiting for things to be finalized, this is how I did things in PJS
but it seems that if I run a second call without waiting for things to be finalized I get the "cannot regress" error in rune.js

async evaluate(time, receipt) {
        if (this._currentTime > time)
            throw new Error("cannot regress");

If I use finalizedEvents in the first call, then everything works fine.

So what am I missing? Do I actually need to wait for everything to finish (finalize) or I can somehow handle this situation?

@VadimSaveljev VadimSaveljev added the bug Something is broken label Jul 17, 2023
@tjjfvi
Copy link
Contributor

tjjfvi commented Jul 17, 2023

This is caused by #1151, which I'm aiming to fix by end of week

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something is broken
Projects
Status: No status
Development

No branches or pull requests

2 participants