From 13a44e03a743aa0dc2bb58aebc59c22d1dfb2fce Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 4 Sep 2018 03:15:18 -1100 Subject: [PATCH] Test --- src/cc/oracles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cc/oracles.cpp b/src/cc/oracles.cpp index 89579f7af..5e1f367ad 100644 --- a/src/cc/oracles.cpp +++ b/src/cc/oracles.cpp @@ -169,7 +169,8 @@ CPubKey OracleBatonPk(char *batonaddr,struct CCcontract_info *cp,CPubKey mypk) Myprivkey(priv); for (i=0; i<32; i++) cp->unspendablepriv2[i] = (priv[i] ^ cp->CCpriv[i]); - if ( secp256k1_ec_pubkey_create(ctx,&pubkey,cp->unspendablepriv2) == 0 ) + cp->unspendablepriv2[0] = cp->unspendablepriv2[31] = 0; + if ( secp256k1_ec_pubkey_create(ctx,&pubkey,cp->unspendablepriv2) != 0 ) { secp256k1_ec_pubkey_serialize(ctx,(unsigned char*)batonpk.begin(),&clen,&pubkey,SECP256K1_EC_COMPRESSED); cp->unspendablepk2 = batonpk;