Removes dead code from after the generate method was removed
https://github.com/bitcoin/bitcoin/pull/15492/commits/8bb3e4c487500a580e3e18791b1f4e7dcdd35442
---
Depends on D6710
Partial backport of Core [[https://github.com/bitcoin/bitcoin/pull/15492 | PR15492]]