-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f5dc8a
commit b8dcf99
Showing
5 changed files
with
333 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
|
||
package evm | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/ava-labs/avalanchego/ids" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestMempoolAddTx(t *testing.T) { | ||
require := require.New(t) | ||
m, err := NewMempool(ids.Empty, 5_000) | ||
require.NoError(err) | ||
|
||
txs := make([]*GossipAtomicTx, 0) | ||
for i := 0; i < 3_000; i++ { | ||
tx := &GossipAtomicTx{ | ||
Tx: &Tx{ | ||
UnsignedAtomicTx: &TestUnsignedTx{ | ||
IDV: ids.GenerateTestID(), | ||
}, | ||
}, | ||
} | ||
|
||
txs = append(txs, tx) | ||
require.NoError(m.Add(tx)) | ||
} | ||
|
||
for _, tx := range txs { | ||
require.True(m.bloom.Has(tx)) | ||
} | ||
} |
Oops, something went wrong.