forked from TrueCloudLab/neoneo-go
mempool: add test for concurrent conflicting tx addition
Ref. https://github.com/neo-project/neo/pull/2818#discussion_r1206658847. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
aca12b58c0
commit
db812f7fa5
1 changed files with 7 additions and 0 deletions
|
@ -541,6 +541,13 @@ func TestMempoolAddRemoveConflicts(t *testing.T) {
|
|||
_, ok := mp.TryGetValue(tx13.Hash())
|
||||
require.Equal(t, false, ok)
|
||||
require.ErrorIs(t, mp.Add(tx13, fs), ErrConflictsAttribute)
|
||||
|
||||
tx14 := getConflictsTx(smallNetFee)
|
||||
tx15 := getConflictsTx(smallNetFee, tx14.Hash())
|
||||
require.NoError(t, mp.Add(tx15, fs))
|
||||
require.NoError(t, mp.Add(tx14, fs))
|
||||
err := mp.Add(tx15, fs)
|
||||
require.ErrorIs(t, err, ErrConflictsAttribute)
|
||||
}
|
||||
|
||||
func TestMempoolAddWithDataGetData(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue