GetLocalNodeIDBytes get current node ID copy in []byte.
()
| 116 | |
| 117 | // GetLocalNodeIDBytes get current node ID copy in []byte. |
| 118 | func GetLocalNodeIDBytes() (rawNodeID []byte, err error) { |
| 119 | localKey.RLock() |
| 120 | if localKey.nodeID != nil { |
| 121 | rawNodeID = make([]byte, len(localKey.nodeID)) |
| 122 | copy(rawNodeID, localKey.nodeID) |
| 123 | } else { |
| 124 | err = ErrNilField |
| 125 | } |
| 126 | localKey.RUnlock() |
| 127 | return |
| 128 | } |
| 129 | |
| 130 | // GetLocalNonce gets current node nonce copy. |
| 131 | func GetLocalNonce() (nonce *mine.Uint256, err error) { |
no outgoing calls