-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This would also be true for concurrent starts of both multinonce and bitflip, since neither takes into account in-flight transactions.
To fix this we could emit an event from the Forwarder which includes the nonce. So that we can then inspect the mempool for these events to find the current nonce, this would also make the start up logic much simpler as we can always just use the latest log. Eg the following should be enough:
const relevantLogs = await provider.getLogs({ ...eventFilter, fromBlock: 0, toBlock: "pending" })
const latestNonce = decode(relevantLogs[relevantLogs.length - 1]).indexAndNonce;
Although infura will only return a maximum of 10000 results, so it may need to do fromBlock === currentBlock - 1000, and if no logs are found we go back further in time.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working