mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
4df5d370c5
Sometimes user needs to construct transaction by itself, so it's better to unify nonce sources for auto-generated and manually-generated transactions to avoid nonce collisions in tests.
9 lines
164 B
Go
9 lines
164 B
Go
package neotest
|
|
|
|
var _nonce uint32
|
|
|
|
// Nonce returns unique number that can be used as nonce for new transactions.
|
|
func Nonce() uint32 {
|
|
_nonce++
|
|
return _nonce
|
|
}
|