From 66b80ef0ff919a320dc6c028ca0449df3b402085 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Sat, 7 Aug 2021 09:56:10 +0700 Subject: [PATCH] Invariant: if no notification, then no pools growth --- txpool/pool_fuzz_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/txpool/pool_fuzz_test.go b/txpool/pool_fuzz_test.go index 40d59ae43..27f9a8661 100644 --- a/txpool/pool_fuzz_test.go +++ b/txpool/pool_fuzz_test.go @@ -229,6 +229,8 @@ func splitDataset(in TxSlots) (TxSlots, TxSlots, TxSlots, TxSlots) { return p1, p2, p3, p4 } +var i, j, k int + func FuzzOnNewBlocks10(f *testing.F) { var u64 = [1 * 4]byte{1} var sender = [1 + 1 + 1]byte{1} @@ -237,9 +239,10 @@ func FuzzOnNewBlocks10(f *testing.F) { f.Add(u64[:], u64[:], u64[:], u64[:], sender[:], 10, 12) f.Fuzz(func(t *testing.T, txNonce, values, tips, feeCap, sender []byte, protocolBaseFee1, blockBaseFee1 uint8) { //t.Parallel() - if protocolBaseFee1 > 4 || blockBaseFee1 > 4 { - t.Skip() - } + i++ + //if protocolBaseFee1 > 4 || blockBaseFee1 > 4 { + // t.Skip() + //} protocolBaseFee, blockBaseFee := uint64(protocolBaseFee1), uint64(blockBaseFee1) //protocolBaseFeeU256, blockBaseFeeU256 := uint256.NewInt(protocolBaseFee), uint256.NewInt(blockBaseFee) if protocolBaseFee == 0 || blockBaseFee == 0 { @@ -267,6 +270,8 @@ func FuzzOnNewBlocks10(f *testing.F) { check := func(unwindTxs, minedTxs TxSlots, msg string) { pending, baseFee, queued := pool.pending, pool.baseFee, pool.queued //if pending.Len() > 5 && baseFee.Len() > 5 && queued.Len() > 5 { + // j++ + // fmt.Printf("a: %d,%d\n", i, j) // fmt.Printf("len %s: %d,%d,%d\n", msg, pending.Len(), baseFee.Len(), queued.Len()) //}