Skip to content

Commit

Permalink
Merge pull request #168 from nspcc-dev/fix-failed-setup
Browse files Browse the repository at this point in the history
internal: adjust awaiting timeout for setup transactions
  • Loading branch information
roman-khimov authored Apr 25, 2024
2 parents 7c95068 + 17c8317 commit 7c1946a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/internal/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,18 @@ func newNEP5Transfer(validatorCount int, sc util.Uint160, from, to util.Uint160,
}

func fillChain(ctx context.Context, c *rpcclient.Client, proto result.Protocol, sgn *signer, vote bool, opts BenchOptions) error {
// minAwaitThreshold is the minimum required threshold for setup transactions to be awaited.
var minAwaitThreshold = 3 * time.Second

cs, err := c.GetNativeContracts()
if err != nil {
return err
}

timeout := 3 * time.Duration(proto.MillisecondsPerBlock) * time.Millisecond
if timeout < minAwaitThreshold {
timeout = minAwaitThreshold
}

var neoHash, gasHash, mgmtHash util.Uint160
for i := range cs {
Expand Down

0 comments on commit 7c1946a

Please sign in to comment.