mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-19 00:54:12 +00:00
Invariant: if no notification, then no pools growth
This commit is contained in:
parent
b3fbf42230
commit
66b80ef0ff
@ -229,6 +229,8 @@ func splitDataset(in TxSlots) (TxSlots, TxSlots, TxSlots, TxSlots) {
|
|||||||
return p1, p2, p3, p4
|
return p1, p2, p3, p4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var i, j, k int
|
||||||
|
|
||||||
func FuzzOnNewBlocks10(f *testing.F) {
|
func FuzzOnNewBlocks10(f *testing.F) {
|
||||||
var u64 = [1 * 4]byte{1}
|
var u64 = [1 * 4]byte{1}
|
||||||
var sender = [1 + 1 + 1]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.Add(u64[:], u64[:], u64[:], u64[:], sender[:], 10, 12)
|
||||||
f.Fuzz(func(t *testing.T, txNonce, values, tips, feeCap, sender []byte, protocolBaseFee1, blockBaseFee1 uint8) {
|
f.Fuzz(func(t *testing.T, txNonce, values, tips, feeCap, sender []byte, protocolBaseFee1, blockBaseFee1 uint8) {
|
||||||
//t.Parallel()
|
//t.Parallel()
|
||||||
if protocolBaseFee1 > 4 || blockBaseFee1 > 4 {
|
i++
|
||||||
t.Skip()
|
//if protocolBaseFee1 > 4 || blockBaseFee1 > 4 {
|
||||||
}
|
// t.Skip()
|
||||||
|
//}
|
||||||
protocolBaseFee, blockBaseFee := uint64(protocolBaseFee1), uint64(blockBaseFee1)
|
protocolBaseFee, blockBaseFee := uint64(protocolBaseFee1), uint64(blockBaseFee1)
|
||||||
//protocolBaseFeeU256, blockBaseFeeU256 := uint256.NewInt(protocolBaseFee), uint256.NewInt(blockBaseFee)
|
//protocolBaseFeeU256, blockBaseFeeU256 := uint256.NewInt(protocolBaseFee), uint256.NewInt(blockBaseFee)
|
||||||
if protocolBaseFee == 0 || blockBaseFee == 0 {
|
if protocolBaseFee == 0 || blockBaseFee == 0 {
|
||||||
@ -267,6 +270,8 @@ func FuzzOnNewBlocks10(f *testing.F) {
|
|||||||
check := func(unwindTxs, minedTxs TxSlots, msg string) {
|
check := func(unwindTxs, minedTxs TxSlots, msg string) {
|
||||||
pending, baseFee, queued := pool.pending, pool.baseFee, pool.queued
|
pending, baseFee, queued := pool.pending, pool.baseFee, pool.queued
|
||||||
//if pending.Len() > 5 && baseFee.Len() > 5 && queued.Len() > 5 {
|
//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())
|
// fmt.Printf("len %s: %d,%d,%d\n", msg, pending.Len(), baseFee.Len(), queued.Len())
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user