Exemple #1
0
func (vm *VersionMessage) SetNonce(n uint64) {
	answer := mymath.Uint642HexRev(n)
	for i := 0; i < 8; i++ {
		vm.Nonce[i] = answer[i]
	}
}
Exemple #2
0
func (vm *VersionMessage) SetTimestampNow() {
	answer := mymath.Uint642HexRev(uint64(time.Seconds()))
	for i := 0; i < 8; i++ {
		vm.Timestamp[i] = answer[i]
	}
}
Exemple #3
0
func (vm *VersionMessage) SetTimestamp(setTime uint64) {
	answer := mymath.Uint642HexRev(setTime)
	for i := 0; i < 8; i++ {
		vm.Timestamp[i] = answer[i]
	}
}
Exemple #4
0
func (vm *VersionMessage) SetServices(ser uint64) {
	answer := mymath.Uint642HexRev(ser)
	for i := 0; i < 8; i++ {
		vm.Services[i] = answer[i]
	}
}
Exemple #5
0
func (na *NetworkAddress) SetServices(ser uint64) {
	answer := mymath.Uint642HexRev(ser)
	for i := 0; i < 8; i++ {
		na.Services[i] = answer[i]
	}
}
Exemple #6
0
func (to *TxOut) SetValue(val uint64) {
	answer := mymath.Uint642HexRev(val)
	copy(to.Value[:], answer)
}