Compare commits

...

1 commit

Author SHA1 Message Date
Ekaterina Pavlova
4cf1d5a0fa services: fix TestNotary
It is failing sometimes because transaction is being accepted. It
happens because executor's chain continuously produces blocks, so
occasionally the block is being accepted right after transaction
submission.

Close ##3366

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-04-01 11:39:10 +03:00

View file

@ -315,7 +315,11 @@ func TestNotary(t *testing.T) {
}, completedTx.Scripts[len(completedTx.Scripts)-1])
} else {
completedTx := getCompletedTx(t, false, requests[0].MainTransaction.Hash())
require.Nil(t, completedTx, fmt.Errorf("main transaction shouldn't be completed: sent %d out of %d requests", sentCount, nSigs))
if completedTx != nil {
require.NotNil(t, completedTx, fmt.Errorf("main transaction completed: sent %d out of %d requests", sentCount, nSigs))
} else {
require.Nil(t, completedTx, fmt.Errorf("main transaction shouldn't be completed: sent %d out of %d requests", sentCount, nSigs))
}
}
}
checkFallbackTxs := func(t *testing.T, requests []*payload.P2PNotaryRequest, shouldComplete bool) {