Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: forward txns over p2p #116

Merged
merged 2 commits into from
Dec 19, 2024
Merged

feat: forward txns over p2p #116

merged 2 commits into from
Dec 19, 2024

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Dec 19, 2024

this adds sequencer forwarding if the transaction was received via eth_sendrawtransaction

Copy link
Contributor

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

// spawn raw transaction forwarding
let txhandle = node.node.network.transactions_handle().await.unwrap();
let raw_txs =
node.node.add_ons_handle.eth_api().eth_api().subscribe_to_raw_transactions();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eth_api().eth_api() we should fix

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not unless we want to replace the wrapped OpEthApi(EthApi) with actually impls for OpEthApi, but I guess we could rename this fn instead

@@ -124,6 +125,12 @@ fn main() {
})
.await?;

// spawn raw transaction forwarding
let txhandle = node.node.network.transactions_handle().await.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wish we coudl get rid of node.node

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can rename the variable

@onbjerg onbjerg merged commit 1afb068 into main Dec 19, 2024
14 checks passed
@onbjerg onbjerg deleted the matt/forward-txns-overp2p branch December 19, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants