Skip to content

Commit

Permalink
Fixed txpool tests (#12810)
Browse files Browse the repository at this point in the history
Updated for E3
  • Loading branch information
dvovk authored Nov 21, 2024
1 parent 5cd8a75 commit 859724f
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions txnprovider/txpool/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ func TestNonceFromAddress(t *testing.T) {
}

func TestReplaceWithHigherFee(t *testing.T) {
t.Skip("TODO")
assert, require := assert.New(t), require.New(t)
ch := make(chan Announcements, 100)
coreDB, _ := temporaltest.NewTestDB(t, datadir.New(t.TempDir()))
Expand All @@ -194,8 +193,7 @@ func TestReplaceWithHigherFee(t *testing.T) {
}
var addr [20]byte
addr[0] = 1
v := make([]byte, EncodeSenderLengthForStorage(2, *uint256.NewInt(1 * common.Ether)))
EncodeSender(2, *uint256.NewInt(1 * common.Ether), v)
v := types2.EncodeAccountBytesV3(2, uint256.NewInt(1*common.Ether), make([]byte, 32), 1)
change.ChangeBatch[0].Changes = append(change.ChangeBatch[0].Changes, &remote.AccountChange{
Action: remote.Action_UPSERT,
Address: gointerfaces.ConvertAddressToH160(addr),
Expand Down Expand Up @@ -287,7 +285,6 @@ func TestReplaceWithHigherFee(t *testing.T) {
}

func TestReverseNonces(t *testing.T) {
t.Skip("TODO")
assert, require := assert.New(t), require.New(t)
ch := make(chan Announcements, 100)
coreDB, _ := temporaltest.NewTestDB(t, datadir.New(t.TempDir()))
Expand All @@ -313,8 +310,7 @@ func TestReverseNonces(t *testing.T) {
}
var addr [20]byte
addr[0] = 1
v := make([]byte, EncodeSenderLengthForStorage(2, *uint256.NewInt(1 * common.Ether)))
EncodeSender(2, *uint256.NewInt(1 * common.Ether), v)
v := types2.EncodeAccountBytesV3(2, uint256.NewInt(1*common.Ether), make([]byte, 32), 1)
change.ChangeBatch[0].Changes = append(change.ChangeBatch[0].Changes, &remote.AccountChange{
Action: remote.Action_UPSERT,
Address: gointerfaces.ConvertAddressToH160(addr),
Expand Down Expand Up @@ -413,7 +409,6 @@ func TestReverseNonces(t *testing.T) {
// this is a workaround for cases when transactions are getting stuck for strange reasons
// even though logs show they are broadcast
func TestTxPoke(t *testing.T) {
t.Skip("TODO")
assert, require := assert.New(t), require.New(t)
ch := make(chan Announcements, 100)
coreDB, _ := temporaltest.NewTestDB(t, datadir.New(t.TempDir()))
Expand All @@ -439,8 +434,7 @@ func TestTxPoke(t *testing.T) {
}
var addr [20]byte
addr[0] = 1
v := make([]byte, EncodeSenderLengthForStorage(2, *uint256.NewInt(1 * common.Ether)))
EncodeSender(2, *uint256.NewInt(1 * common.Ether), v)
v := types2.EncodeAccountBytesV3(2, uint256.NewInt(1*common.Ether), make([]byte, 32), 1)
change.ChangeBatch[0].Changes = append(change.ChangeBatch[0].Changes, &remote.AccountChange{
Action: remote.Action_UPSERT,
Address: gointerfaces.ConvertAddressToH160(addr),
Expand Down Expand Up @@ -799,7 +793,6 @@ func TestSetCodeTxnValidationWithLargeAuthorizationValues(t *testing.T) {

// Blob gas price bump + other requirements to replace existing txns in the pool
func TestBlobTxnReplacement(t *testing.T) {
t.Skip("TODO")
assert, require := assert.New(t), require.New(t)
ch := make(chan Announcements, 5)
coreDB, _ := temporaltest.NewTestDB(t, datadir.New(t.TempDir()))
Expand Down Expand Up @@ -827,8 +820,7 @@ func TestBlobTxnReplacement(t *testing.T) {
addr[0] = 1

// Add 1 eth to the user account, as a part of change
v := make([]byte, EncodeSenderLengthForStorage(2, *uint256.NewInt(1 * common.Ether)))
EncodeSender(2, *uint256.NewInt(1 * common.Ether), v)
v := types2.EncodeAccountBytesV3(2, uint256.NewInt(1*common.Ether), make([]byte, 32), 1)

change.ChangeBatch[0].Changes = append(change.ChangeBatch[0].Changes, &remote.AccountChange{
Action: remote.Action_UPSERT,
Expand Down Expand Up @@ -974,7 +966,6 @@ func makeBlobTxn() TxnSlot {
}

func TestDropRemoteAtNoGossip(t *testing.T) {
t.Skip("TODO")
assert, require := assert.New(t), require.New(t)
ch := make(chan Announcements, 100)
coreDB, _ := temporaltest.NewTestDB(t, datadir.New(t.TempDir()))
Expand Down Expand Up @@ -1009,8 +1000,7 @@ func TestDropRemoteAtNoGossip(t *testing.T) {
}
var addr [20]byte
addr[0] = 1
v := make([]byte, EncodeSenderLengthForStorage(2, *uint256.NewInt(1 * common.Ether)))
EncodeSender(2, *uint256.NewInt(1 * common.Ether), v)
v := types2.EncodeAccountBytesV3(2, uint256.NewInt(1*common.Ether), make([]byte, 32), 1)
change.ChangeBatch[0].Changes = append(change.ChangeBatch[0].Changes, &remote.AccountChange{
Action: remote.Action_UPSERT,
Address: gointerfaces.ConvertAddressToH160(addr),
Expand Down Expand Up @@ -1083,7 +1073,6 @@ func TestDropRemoteAtNoGossip(t *testing.T) {
}

func TestBlobSlots(t *testing.T) {
t.Skip("TODO")
assert, require := assert.New(t), require.New(t)
ch := make(chan Announcements, 5)
coreDB, _ := temporaltest.NewTestDB(t, datadir.New(t.TempDir()))
Expand Down Expand Up @@ -1113,8 +1102,7 @@ func TestBlobSlots(t *testing.T) {
var addr [20]byte

// Add 1 eth to the user account, as a part of change
v := make([]byte, EncodeSenderLengthForStorage(0, *uint256.NewInt(1 * common.Ether)))
EncodeSender(0, *uint256.NewInt(1 * common.Ether), v)
v := types2.EncodeAccountBytesV3(0, uint256.NewInt(1*common.Ether), make([]byte, 32), 1)

for i := 0; i < 11; i++ {
addr[0] = uint8(i + 1)
Expand Down Expand Up @@ -1162,7 +1150,6 @@ func TestBlobSlots(t *testing.T) {
}

func TestGasLimitChanged(t *testing.T) {
t.Skip("TODO")
assert, require := assert.New(t), require.New(t)
ch := make(chan Announcements, 100)

Expand All @@ -1180,8 +1167,7 @@ func TestGasLimitChanged(t *testing.T) {
h1 := gointerfaces.ConvertHashToH256([32]byte{})
var addr [20]byte
addr[0] = 1
v := make([]byte, EncodeSenderLengthForStorage(2, *uint256.NewInt(1 * common.Ether)))
EncodeSender(2, *uint256.NewInt(1 * common.Ether), v)
v := types2.EncodeAccountBytesV3(0, uint256.NewInt(1*common.Ether), make([]byte, 32), 1)
tx, err := db.BeginRw(ctx)
require.NoError(err)
defer tx.Rollback()
Expand Down

0 comments on commit 859724f

Please sign in to comment.