rpc: fix bug in Actor's waiter
Execution events are followed by block events, not vise versa, thus, we can wait until VUB block to be accepted to be sure that transaction wasn't accepted to chain.
This commit is contained in:
parent
0a5905390c
commit
5811687836
1 changed files with 2 additions and 2 deletions
|
@ -244,8 +244,8 @@ func (w *EventWaiter) WaitAny(ctx context.Context, vub uint32, hashes ...util.Ui
|
|||
close(aerRcvr)
|
||||
}
|
||||
}()
|
||||
// Execution event follows the block event, thus wait until the block next to the VUB to be sure.
|
||||
since := vub + 1
|
||||
// Execution event precedes the block event, thus wait until the VUB-th block to be sure.
|
||||
since := vub
|
||||
blocksID, err := w.ws.ReceiveBlocks(&neorpc.BlockFilter{Since: &since}, bRcvr)
|
||||
if err != nil {
|
||||
wsWaitErr = fmt.Errorf("failed to subscribe for new blocks: %w", err)
|
||||
|
|
Loading…
Reference in a new issue