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

eth: fix max gas price nil pointer error in replace transaction #2001

Merged
merged 2 commits into from
Sep 7, 2021

Conversation

kyriediculous
Copy link
Contributor

@kyriediculous kyriediculous commented Aug 22, 2021

What does this pull request do? Explain your changes. (required)
Check that gpm.MaxGasPrice isn't nil in TransctionManager.replace()

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ff626d592eb]

goroutine 44 [running]:
math/big.(*Int).Cmp(0xc00107b5a0, 0x0, 0x1)
        D:/a/_temp/msys/msys64/mingw64/lib/go/src/math/big/int.go:328 +0x4b
github.com/livepeer/go-livepeer/eth.(*TransactionManager).replace(0xc0004340f0, 0xc001760750, 0x7ff6292630c0, 0x7ff628912a01, 0x7ff6292630c0)
        D:/a/go-livepeer/go-livepeer/eth/transactionManager.go:169 +0x1e8
github.com/livepeer/go-livepeer/eth.(*TransactionManager).checkTxLoop(0xc0004340f0)
        D:/a/go-livepeer/go-livepeer/eth/transactionManager.go:222 +0x2a9
github.com/livepeer/go-livepeer/eth.(*TransactionManager).Start(0xc0004340f0)
        D:/a/go-livepeer/go-livepeer/eth/transactionManager.go:124 +0x32
created by main.main
        D:/a/go-livepeer/go-livepeer/cmd/livepeer/livepeer.go:412 +0x2a9a

Specific updates (required)
added nil check

How did you test each of these updates (required)
Removed max gas price initial value from unit tests

Checklist:

CHANGELOG_PENDING.md Outdated Show resolved Hide resolved
eth/transactionManager_test.go Outdated Show resolved Hide resolved
Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

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

LGTM

@yondonfu yondonfu merged commit 94b3a14 into master Sep 7, 2021
@yondonfu yondonfu deleted the nv/max-gp-nil branch September 7, 2021 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants