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

txnprovider/txpool: move more txpool types out of erigon-lib #12725

Merged
merged 6 commits into from
Nov 15, 2024

Conversation

taratorio
Copy link
Member

@taratorio taratorio commented Nov 14, 2024

relates to #13377
move last bits of txpool related types out of erigon-lib
in subsequent PRs will further split and organise some of these into better packages

@@ -150,106 +144,3 @@ func (mf MergedFiles) Close() {
}
}
}

func DecodeAccountBytes(enc []byte) (nonce uint64, balance *uint256.Int, hash []byte) {
Copy link
Member Author

Choose a reason for hiding this comment

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

unused code

return
}

func EncodeAccountBytes(nonce uint64, balance *uint256.Int, hash []byte, incarnation uint64) []byte {
Copy link
Member Author

Choose a reason for hiding this comment

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

unused code

import (
"github.com/holiman/uint256"
)

Copy link
Member Author

@taratorio taratorio Nov 14, 2024

Choose a reason for hiding this comment

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

moved back inside relevant tests that are using it in txnprovider/txpool

// nolint
func (tx *TxSlot) PrintDebug(prefix string) {
fmt.Printf("%s: senderID=%d,nonce=%d,tip=%d,v=%d\n", prefix, tx.SenderID, tx.Nonce, tx.Tip, tx.Value.Uint64())
//fmt.Printf("%s: senderID=%d,nonce=%d,tip=%d,hash=%x\n", prefix, tx.senderID, tx.nonce, tx.tip, tx.IdHash)
}

// AccessList is an EIP-2930 access list.
type AccessList []AccessTuple
Copy link
Member Author

Choose a reason for hiding this comment

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

moved to core/types alongside AccessListTx


// This test actually applies to testing the behaviour as seen from the
// onNewTx behaviour in filters.go
func TestShortUnwrapLib(t *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

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

this test and TestShortUnwrap are 1:1 the same now

@@ -738,89 +734,21 @@ func TestBlobTxEncodeDecode(t *testing.T) {
}
}

func makeBlobTxRlp() []byte {
Copy link
Member Author

Choose a reason for hiding this comment

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

moved to core/types/typestest pkg

@taratorio taratorio enabled auto-merge (squash) November 15, 2024 19:03
@taratorio taratorio merged commit 3733391 into main Nov 15, 2024
14 of 15 checks passed
@taratorio taratorio deleted the move-tx-pool-types branch November 15, 2024 19:30
somnathb1 pushed a commit that referenced this pull request Jan 24, 2025
move last bits of txpool related types out of erigon-lib
in subsequent PRs will further split and organise some of these into
better packages
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.

2 participants