Endian fix

This commit is contained in:
jl777
2018-11-10 05:28:52 -11:00
parent bd19a3867b
commit df5b020b34
2 changed files with 5 additions and 2 deletions

View File

@@ -534,7 +534,10 @@ uint256 DiceHashEntropy(uint256 &entropy,uint256 _txidpriv,int32_t vout,int32_t
memset(&hentropy,0,32);
endiancpy(txidpriv.bytes,(uint8_t *)&_txidpriv,32);
if ( usevout != 0 )
txidpriv.uints[1] ^= vout;
{
txidpriv.bytes[1] ^= (vout & 0xff);
txidpriv.bytes[2] ^= ((vout>>8) & 0xff);
}
txidpriv.bytes[0] &= 0xf8, txidpriv.bytes[31] &= 0x7f, txidpriv.bytes[31] |= 0x40;
txidpub = curve25519(txidpriv,curve25519_basepoint9());