Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nonce getting on Lotus lite #6048

Merged
merged 2 commits into from
Apr 18, 2021
Merged

Fix nonce getting on Lotus lite #6048

merged 2 commits into from
Apr 18, 2021

Conversation

Kubuxu
Copy link
Contributor

@Kubuxu Kubuxu commented Apr 15, 2021

Resolves #5593
Resolves #5995

@Kubuxu
Copy link
Contributor Author

Kubuxu commented Apr 15, 2021

Mpool should probably switch to using that for nonce getting but it also uses Actor data for balance information.

Resolves #5593 #5995

Signed-off-by: Jakub Sztandera <[email protected]>
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mpool also has a GetNonce (messagepool.go:798-ish) which needs to satisfy messagesigner.MpoolNonceAPI - assigned here in DI (this is why the tests are failing)

@@ -97,7 +97,7 @@ func (ms *MessageSigner) nextNonce(addr address.Address) (uint64, error) {
// that have mempool nonces, so first check the mempool for a nonce for
// this address. Note that the mempool returns the actor state's nonce
// by default.
nonce, err := ms.mpool.GetNonce(addr)
nonce, err := ms.mpool.GetNonce(context.TODO(), addr, types.EmptyTSK)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a context in SignMessage, can just use it here

@magik6k magik6k merged commit c72eb0c into master Apr 18, 2021
@magik6k magik6k deleted the fix/nonce-getting branch April 18, 2021 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants