MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / insert

Method insert

fendermint/eth/api/src/mpool.rs:38–44  ·  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

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

Callers 15

newMethod · 0.45
newMethod · 0.45
newMethod · 0.45
putMethod · 0.45
deleteMethod · 0.45
apply_bothFunction · 0.45
dependenciesMethod · 0.45
bytecode_linkingFunction · 0.45
library_dependenciesFunction · 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