MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / insert

Method insert

fendermint/eth/api/src/mpool.rs:36–42  ·  view source on GitHub ↗

Insert a transaction we could not submit straight away into the buffer.

(&self, sender: Address, nonce: Nonce, msg: ChainMessage)

Source from the content-addressed store, hash-verified

34impl TransactionBuffer {
35 /// Insert a transaction we could not submit straight away into the buffer.
36 pub fn insert(&self, sender: Address, nonce: Nonce, msg: ChainMessage) {
37 self.0.with(|c| {
38 let buffer = c.entry(sender).or_insert_with(BTreeMap::new);
39 // Overwrite any previous entry to protect against DoS attack; it wouldn't make sense to submit them anyway.
40 buffer.insert(nonce, msg);
41 })
42 }
43
44 /// Remove all (sender, nonce) pairs which were included in a block.
45 fn remove_many<'a, I>(&self, txs: I)

Callers 15

putMethod · 0.45
deleteMethod · 0.45
apply_bothFunction · 0.45
dependenciesMethod · 0.45
bytecode_linkingFunction · 0.45
library_dependenciesFunction · 0.45
runMethod · 0.45
add_web_socketMethod · 0.45
insert_filter_driverMethod · 0.45
send_raw_transactionFunction · 0.45
collect_emittersFunction · 0.45

Calls 1

withMethod · 0.80

Tested by 15

apply_bothFunction · 0.36
bytecode_linkingFunction · 0.36
library_dependenciesFunction · 0.36
gen_stateMethod · 0.36
next_stateMethod · 0.36
updateMethod · 0.36
create_accountMethod · 0.36
create_root_genesisMethod · 0.36
create_nodeMethod · 0.36