Publisher

This commit is contained in:
jl777
2018-09-05 03:11:05 -11:00
parent d898dbce76
commit 17a9434a0f

View File

@@ -376,6 +376,7 @@ int64_t correlate_price(int32_t height,int64_t *prices,int32_t n)
int32_t i,j; int64_t price = 0;
if ( n == 1 )
return(prices[0]);
// deterministic sort, like heapsort
for (i=0; i<n; i++)
{
j = (height + i) % n;
@@ -802,7 +803,7 @@ UniValue OracleInfo(uint256 origtxid)
{
if ( regtx.vout.size() > 0 && DecodeOraclesOpRet(regtx.vout[regtx.vout.size()-1].scriptPubKey,oracletxid,pk,datafee) == 'R' && oracletxid == origtxid )
{
obj.push_back(Pair("provider",pubkey33_str(str,(uint8_t *)pk.begin())));
obj.push_back(Pair("publisher",pubkey33_str(str,(uint8_t *)pk.begin())));
Getscriptaddress(batonaddr,regtx.vout[1].scriptPubKey);
batontxid = OracleBatonUtxo(10000,cp,oracletxid,batonaddr,pk,data);
obj.push_back(Pair("baton",batonaddr));