Skip to content

Commit 9b3862f

Browse files
authored
resolve test issues around bad tx hash table (0xPolygonHermez#1646)
1 parent 24b99e6 commit 9b3862f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

erigon-lib/kv/tables.go

+2
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ const (
548548
TablePoolLimbo = "PoolLimbo"
549549
BATCH_ENDS = "batch_ends"
550550
WITNESS_CACHE = "witness_cache"
551+
BAD_TX_HASHES = "bad_tx_hashes"
551552
//Diagnostics tables
552553
DiagSystemInfo = "DiagSystemInfo"
553554
DiagSyncStages = "DiagSyncStages"
@@ -793,6 +794,7 @@ var ChaindataTables = []string{
793794
TablePoolLimbo,
794795
BATCH_ENDS,
795796
WITNESS_CACHE,
797+
BAD_TX_HASHES,
796798
}
797799

798800
const (

turbo/jsonrpc/send_transaction_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ func TestSendRawTransaction(t *testing.T) {
9090
txPool := txpool.NewTxpoolClient(conn)
9191
ff := rpchelper.New(ctx, nil, txPool, txpool.NewMiningClient(conn), func() {}, mockSentry.Log)
9292
api := jsonrpc.NewEthAPI(newBaseApiForTest(mockSentry), mockSentry.DB, nil, txPool, nil, 5000000, 1e18, 100_000, &ethconfig.Defaults, false, 100_000, 128, logger)
93+
api.BadTxAllowance = 1
9394

9495
buf := bytes.NewBuffer(nil)
9596
err = txn.MarshalBinary(buf)
@@ -144,6 +145,7 @@ func TestSendRawTransactionUnprotected(t *testing.T) {
144145
txPool := txpool.NewTxpoolClient(conn)
145146
ff := rpchelper.New(ctx, nil, txPool, txpool.NewMiningClient(conn), func() {}, mockSentry.Log)
146147
api := jsonrpc.NewEthAPI(newBaseApiForTest(mockSentry), mockSentry.DB, nil, txPool, nil, 5000000, 1e18, 100_000, &ethconfig.Defaults, false, 100_000, 128, logger)
148+
api.BadTxAllowance = 1
147149

148150
// Enable unproteced txs flag
149151
api.AllowUnprotectedTxs = true

0 commit comments

Comments
 (0)