Port https://github.com/ethereum/go-ethereum/pull/26003 --------- Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>