This commit is contained in:
jl777
2018-09-04 01:51:48 -11:00
parent c1e817f6e5
commit f973ac9e14
2 changed files with 5 additions and 2 deletions

View File

@@ -309,6 +309,9 @@ uint64_t get_btcusd()
return(btcusd); return(btcusd);
} }
// oraclescreate "BTCUSD" "coindeskpricedata" "L" -> 4895f631316a649e216153aee7a574bd281686265dc4e8d37597f72353facac3
// oraclesregister 4895f631316a649e216153aee7a574bd281686265dc4e8d37597f72353facac3 1000000
int32_t main(int32_t argc,char **argv) int32_t main(int32_t argc,char **argv)
{ {
printf("Powered by CoinDesk (%s) %.8f\n","https://www.coindesk.com/price/",dstr(get_btcusd())); printf("Powered by CoinDesk (%s) %.8f\n","https://www.coindesk.com/price/",dstr(get_btcusd()));

View File

@@ -170,9 +170,9 @@ CPubKey OracleBatonPk(char *batonaddr,struct CCcontract_info *cp,CPubKey mypk)
cp->unspendablepriv2[i] = ptr[i]; cp->unspendablepriv2[i] = ptr[i];
} }
CPrivKey vchPrivKey(vchTmp.begin(), vchTmp.end()); CPrivKey vchPrivKey(vchTmp.begin(), vchTmp.end());
if (!key.SetPrivKey(vchPrivKey, false)) if (!key.Set(vchTmp.begin(), vchTmp.end(), true))
{ {
printf("ThreadSendAlert() : key.SetPrivKey failed\n"); printf("ThreadSendAlert() : key.Set failed\n");
return(batonpk); return(batonpk);
} }
batonpk = cp->unspendablepk2 = key.GetPubKey(); batonpk = cp->unspendablepk2 = key.GetPubKey();