(init uint64)
| 76 | var needInit = true |
| 77 | |
| 78 | func GetNonceInstance(init uint64) *nonceCounter { |
| 79 | once.Do(func() { |
| 80 | nonceInstance = &nonceCounter{nonce: init} |
| 81 | needInit = false |
| 82 | }) |
| 83 | return nonceInstance |
| 84 | } |
| 85 | |
| 86 | func (p *nonceCounter) GetNonce() uint64 { |
| 87 | p.lock.RLock() |