forked from TrueCloudLab/neoneo-go
rpcsrv: generate randome nonce for RPC server test transactions
Avoid mempool conflicts in tests. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
bfc3aa6b67
commit
335550fb1e
1 changed files with 1 additions and 1 deletions
|
@ -3380,7 +3380,7 @@ func newTxWithParams(t *testing.T, chain *core.Blockchain, code opcode.Opcode, v
|
||||||
|
|
||||||
height := chain.BlockHeight()
|
height := chain.BlockHeight()
|
||||||
tx := transaction.New([]byte{byte(code)}, 0)
|
tx := transaction.New([]byte{byte(code)}, 0)
|
||||||
tx.Nonce = height + 1
|
tx.Nonce = uint32(random.Int(0, math.MaxUint32))
|
||||||
tx.ValidUntilBlock = height + validUntilIncr
|
tx.ValidUntilBlock = height + validUntilIncr
|
||||||
tx.Signers = []transaction.Signer{{Account: acc0.PrivateKey().GetScriptHash()}}
|
tx.Signers = []transaction.Signer{{Account: acc0.PrivateKey().GetScriptHash()}}
|
||||||
tx.SystemFee = systemFee
|
tx.SystemFee = systemFee
|
||||||
|
|
Loading…
Reference in a new issue