go-ethereum
go-ethereum copied to clipboard
cmd/devp2p: add eth cmd to send new block announcements
This PR adds a new subcommand to devp2p: eth. This subcommand has a single command of it's own currently, new-block which sends the specified hex as a devp2p block announcement message. We can expand eth to support more arbitrary message sending in the future.
$ devp2p eth new-block <enode> <msg>
@fjl PTAL when you have a chance!
Another note: the original purpose of this command is kind of lost since the merge, because block announcements are not accepted via eth anymore. We could probably realize the bad block test with the engine API now.
Yeah that is a good point, I'll see if I can update that hive PR to use the engine API instead.