mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 03:47:18 +00:00
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>
This commit is contained in:
parent
86f16bb931
commit
4cf1d5a0fa
1 changed files with 5 additions and 1 deletions
|
@ -315,9 +315,13 @@ func TestNotary(t *testing.T) {
|
||||||
}, completedTx.Scripts[len(completedTx.Scripts)-1])
|
}, completedTx.Scripts[len(completedTx.Scripts)-1])
|
||||||
} else {
|
} else {
|
||||||
completedTx := getCompletedTx(t, false, requests[0].MainTransaction.Hash())
|
completedTx := getCompletedTx(t, false, requests[0].MainTransaction.Hash())
|
||||||
|
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))
|
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) {
|
checkFallbackTxs := func(t *testing.T, requests []*payload.P2PNotaryRequest, shouldComplete bool) {
|
||||||
for i, req := range requests {
|
for i, req := range requests {
|
||||||
if shouldComplete {
|
if shouldComplete {
|
||||||
|
|
Loading…
Reference in a new issue