You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At Skip, we're utilizing the priority nonce mempool for some custom ABCI++ proposal building. We came across an issue where there was a nil pointer dereference in the Next function on the Priority Nonce Mempool.
This issue can be replicated in the following way,
have the key.priority be the minimum value defined on the TxConfig
This will make the else if statement true (as it looks like i.nextPriority defaults to the same min val defined on the TxConfig but im not fully sure on this)
when it attempts to fetch i.priorityNode.Next().Key().(txMeta[C]).weight) it will attempt to dereference a nil pointer.
Simplest fix is likely just wrapping that code in an if i.priorityNode.Next() != nil....
The text was updated successfully, but these errors were encountered:
Thanks for finding this @davidterpay, especially the steps to reproduce. It may be a lot to ask, but do you have a failing test which could be added to priority_nonce_test.go? If not, I will get to it eventually, but this could speed things up depending on your urgency.
What happened?
At Skip, we're utilizing the priority nonce mempool for some custom ABCI++ proposal building. We came across an issue where there was a nil pointer dereference in the
Next
function on the Priority Nonce Mempool.cosmos-sdk/types/mempool/priority_nonce.go
Lines 312 to 324 in dded2e9
Cosmos SDK Version
main
How to reproduce?
This issue can be replicated in the following way,
Simplest fix is likely just wrapping that code in an
if i.priorityNode.Next() != nil...
.The text was updated successfully, but these errors were encountered: