key.Set
This commit is contained in:
@@ -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()));
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user