Write test for fake double endorsement
Reproduce the scenario that happened on ithacanet, where bakers tried to inject a block containing two different endorsements for the same delegate, level, round, and payload hash (NB: the signing scheme used by tz3
addresses is non-deterministic). Most probably, one endorsement came from the mempool and the other from an existing proposal at the same level. (The block was correctly rejected by the protocol, but this meant the network got stuck.)
Can a similar scenario occur for preendorsements?
This was fixed by !4451 (merged). But it would be good to have a test nevertheless.