diff --git a/quantumlayer-emu-prng.go b/quantumlayer-emu-prng.go index 0f8e7e712d144792b9ed578e2f9c90f0a9a082cf..a074502454d58e05e618a6f73730734677fa9d4c 100644 --- a/quantumlayer-emu-prng.go +++ b/quantumlayer-emu-prng.go @@ -23,9 +23,9 @@ import ( ) type QuantumPayloadElement struct { - BulkKeyId int64 // the unique ID of this bulk of keys - BulkKeyLength int // the length, counted in bytes, of bulkKey - BulkKey *[]byte // the bulk key + BulkKeyId int64 `json:"bulk-key-id"` // the unique ID of this bulk of keys + BulkKeyLength int `json:"bulk-key-length"` // the length, counted in bytes, of bulkKey + BulkKey *[]byte `json:"bulk-key"` // the bulk key } type QuantumlayerEmuPRNG struct { @@ -74,6 +74,7 @@ func (qlemuprng *QuantumlayerEmuPRNG) PowerOn(localQLAddress ...string) { udpAddrString = localQLAddress[0] } log.Printf("localQLAddress is %s", localQLAddress[0]) + // This reads random numbers from other Quantum end udpSrvPort, err := net.ResolveUDPAddr("udp", udpAddrString) if err != nil { @@ -178,7 +179,6 @@ func (qlemuprng *QuantumlayerEmuPRNG) AddPeer(addr net.UDPAddr) { } } }(ctx) - } func (qlemuprng *QuantumlayerEmuPRNG) RemovePeer() { @@ -297,5 +297,4 @@ func (store *NumberStore) receiveNumbers(incoming chan QuantumPayloadElement) { store.mu.Unlock() } - }