@@ -183,27 +183,25 @@ Result<BlockExecOutput> propose_block(
183183 return TransactionError::MissingSender;
184184 }
185185 }
186- ankerl::unordered_dense::segmented_set<Address> senders_and_authorities;
186+
187+ auto [entry, success] = block_cache.emplace (
188+ block_id,
189+ BlockCacheEntry{
190+ .block_number = block.header .number ,
191+ .parent_id = consensus_header.parent_id (),
192+ .senders_and_authorities = {}});
193+ MONAD_ASSERT (success, " should never be processing duplicate block" );
187194 for (Address const &sender : senders) {
188- senders_and_authorities.insert (sender);
195+ entry-> second . senders_and_authorities .insert (sender);
189196 }
190197 for (std::vector<std::optional<Address>> const &authorities :
191198 recovered_authorities) {
192199 for (std::optional<Address> const &authority : authorities) {
193200 if (authority.has_value ()) {
194- senders_and_authorities.insert (authority.value ());
201+ entry-> second . senders_and_authorities .insert (authority.value ());
195202 }
196203 }
197204 }
198- MONAD_ASSERT (block_cache
199- .emplace (
200- block_id,
201- BlockCacheEntry{
202- .block_number = block.header .number ,
203- .parent_id = consensus_header.parent_id (),
204- .senders_and_authorities =
205- std::move (senders_and_authorities)})
206- .second );
207205 BOOST_OUTCOME_TRY (static_validate_monad_senders<traits>(senders));
208206
209207 // Create call frames vectors for tracers
0 commit comments