rocket-pool / smartnode

The CLI package for Rocket Pool smart nodes.
GNU General Public License v3.0
149 stars 112 forks source link

V2 Handle a case where priorityFee > maxFee in the task loop #662

Closed thomaspanf closed 1 month ago

thomaspanf commented 1 month ago

Automatic transactions in the task loop fail when the user-inputted priorityFee is greater than the oracle based maxFee. This PR addresses this case by setting priorityFee to min(priorityFee, 25% of the oracle based maxFee) when priorityFee > maxFee for transactions in the node task loop.

This PR slightly differs from #655 because it includes:

github-actions[bot] commented 1 month ago

Coverage Report

github-actions[bot] commented 1 month ago

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ :robot:
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node 0.21% (+0.21%) :thumbsup:

Coverage by file ### Changed files (no unit tests) | Changed File | Coverage Δ | Total | Covered | Missed | :robot: | |--------------|------------|-------|---------|--------|---------| | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node/defend-pdao-props.go | 0.00% (ø) | 639 (-15) | 0 | 639 (-15) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node/distribute-minipools.go | 0.00% (ø) | 583 (-16) | 0 | 583 (-16) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node/node.go | 1.21% (**+1.21%**) | 1317 (+51) | 16 (+16) | 1301 (+35) | :thumbsup: | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node/promote-minipools.go | 0.00% (ø) | 616 (-15) | 0 | 616 (-15) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node/reduce-bonds.go | 0.00% (ø) | 1116 (-32) | 0 | 1116 (-32) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node/stake-prelaunch-minipools.go | 0.00% (ø) | 752 (-15) | 0 | 752 (-15) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node/verify-pdao-props.go | 0.00% (ø) | 1262 (-15) | 0 | 1262 (-15) | | _Please note that the "Total", "Covered", and "Missed" counts above refer to ***code statements*** instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code._ ### Changed unit test files - github.com/rocket-pool/smartnode/v2/rocketpool-daemon/node/applyto_test.go