test
This commit is contained in:
@@ -252,7 +252,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
|
||||
|
||||
const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int32_t opretlen,uint256 txid,uint16_t vout)
|
||||
{
|
||||
uint8_t rmd160[20],addrtype,shortflag,pubkey33[33]; int32_t i,j,n,len,kmdheight,tokomodo=0; char base[4],coinaddr[64],destaddr[64]; struct pax_transaction space; uint256 txids[64]; uint16_t vouts[64]; int64_t fiatoshis,checktoshis; const char *typestr = "unknown";
|
||||
uint8_t rmd160[20],addrtype,shortflag,pubkey33[33]; int32_t i,j,n,len,kmdheight,tokomodo=0; char base[4],coinaddr[64],destaddr[64]; struct pax_transaction space; uint256 txids[64]; uint16_t vouts[64]; uint64_t seed; int64_t fiatoshis,checktoshis; const char *typestr = "unknown";
|
||||
tokomodo = (komodo_is_issuer() == 0);
|
||||
if ( opretbuf[0] == 'D' )
|
||||
{
|
||||
@@ -272,30 +272,9 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
||||
if ( fiatoshis < 0 )
|
||||
fiatoshis = -fiatoshis;
|
||||
bitcoin_address(coinaddr,addrtype,rmd160,20);
|
||||
checktoshis = PAX_fiatdest(tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,fiatoshis);
|
||||
checktoshis = PAX_fiatdest(&seed,tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,fiatoshis);
|
||||
typestr = "deposit";
|
||||
//paxprice seed.0 sum 0.07766840 densum 1000.00000000 basevol 0.01000000 height.59532
|
||||
|
||||
// 0.07759490
|
||||
/* ./komodo-cli paxdeposit RMGrD8DzED6YYT63z1TaF4sVTCB7Qqvj1Z 0.01 eur
|
||||
0245555240420f00000000003c8390ec7bac0c84d9ceb39b1f31564c983123b8e4 ht.59532 srcaddr.(RMGrD8DzED6YYT63z1TaF4sVTCB7Qqvj1Z) eur fiatoshis.1000000 -> dest.(RQY5zAq49YYc8knVkBBpxuxbQa3xwhaw5z) komodoshis.7759490
|
||||
6a26440245555240420f00000000003c8390ec7bac0c84d9ceb39b1f31564c983123b8e48ce80000 opretbuf[40]
|
||||
b1d7350ef5a9502e1249384abccbc5aa78e3172d182757431f548728583de4a2
|
||||
root@devbox2:~/komodo/src# start CreateNewBlock initdone.1478543278 deposit 0.00000000 mempool.274
|
||||
start CreateNewBlock initdone.1478543372 deposit 0.00000000 mempool.0
|
||||
b1d7350ef5a9502e1249384abccbc5aa78e3172d182757431f548728583de4a2 <- txid.v2 0245555240420f00000000003c8390ec7bac0c84d9ceb39b1f31564c983123b8e4 checkpubkey check 0.07766840 v 0.07759490 dest.(RQY5zAq49YYc8knVkBBpxuxbQa3xwhaw5z) kmdheight.59532 height.59533
|
||||
./komodo-cli paxprice eur kmd 59532
|
||||
{
|
||||
"base" : "eur",
|
||||
"rel" : "kmd",
|
||||
"height" : 59532,
|
||||
"timestamp" : 1478543277,
|
||||
"price" : 7.75949000,
|
||||
"invprice" : 0.12887445,
|
||||
"basevolume" : 1.00000000,
|
||||
"relvolume" : 7.75949000
|
||||
}
|
||||
*/
|
||||
if ( tokomodo == 0 && strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0 && shortflag == ASSETCHAINS_SHORTFLAG )
|
||||
{
|
||||
if ( shortflag == 0 )
|
||||
|
||||
Reference in New Issue
Block a user