Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Add pub fn initialize_nonce in NonceMiddleManager #840

Merged
merged 6 commits into from
Jan 31, 2022

Conversation

teebaumcrypto
Copy link
Contributor

@teebaumcrypto teebaumcrypto commented Jan 29, 2022

Initialize the nonce manager with the current nonce

Motivation

The nonce middleManager initializes with nonce 0.
Restarting the built application with ethers-rs, will set it back to 0, the next time the application sends a transaction, it will first pull the nonce, which results in an unnecessary call.

Solution

Added a public function to initialize the nonce, so it can be loaded before a transaction is submitted.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@gakonst gakonst merged commit 2b178e9 into gakonst:master Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants