forked from okx/xlayer-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nil pointer exception when increasing gas price (0xPolygonHermez#…
- Loading branch information
1 parent
bec6a92
commit abf4e2e
Showing
2 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ethtxmanager | ||
|
||
import ( | ||
"math/big" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestIncreaseGasPrice(t *testing.T) { | ||
actual := increaseGasPrice(big.NewInt(100), 1) | ||
assert.Equal(t, big.NewInt(101), actual) | ||
} | ||
|
||
func TestIncreaseGasLimit(t *testing.T) { | ||
actual := increaseGasLimit(100, 1) | ||
assert.Equal(t, uint64(101), actual) | ||
} |