choose the correct nonce

Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
This commit is contained in:
Steven Allen 2021-01-30 10:18:51 -08:00 committed by GitHub
parent 56a9d05491
commit feb24c9684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,8 +52,8 @@ func (a *MpoolNonceAPI) GetNonce(addr address.Address) (uint64, error) {
if vmmsg.From != keyAddr {
continue
}
if vmmsg.Nonce > highestNonce {
highestNonce = vmmsg.Nonce
if vmmsg.Nonce >= highestNonce {
highestNonce = vmmsg.Nonce + 1
}
}
return highestNonce, nil