jl777 8 years ago
parent
commit
0f496cda7b
  1. 4
      iguana/dpow/dpow_rpc.c
  2. 2
      iguana/tests/ratifytest

4
iguana/dpow/dpow_rpc.c

@ -192,7 +192,7 @@ cJSON *dpow_listunspent(struct supernet_info *myinfo,struct iguana_info *coin,ch
char *dpow_signrawtransaction(struct supernet_info *myinfo,struct iguana_info *coin,char *rawtx,cJSON *vins)
{
cJSON *array,*privkeys,*item; char *wifstr,*str,*paramstr,*retstr; uint8_t script[256]; int32_t i,n,len,hashtype; struct vin_info V; struct iguana_waddress *waddr; struct iguana_waccount *wacct;
if ( 0 && coin->FULLNODE < 0 )
if ( coin->FULLNODE < 0 )
{
array = cJSON_CreateArray();
jaddistr(array,rawtx);
@ -205,7 +205,7 @@ char *dpow_signrawtransaction(struct supernet_info *myinfo,struct iguana_info *c
usleep(10000);
return(retstr);
}
else if ( 1 ) //coin->FULLNODE > 0 || coin->VALIDATENODE > 0 )
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 )
{
privkeys = cJSON_CreateArray();
if ( (n= cJSON_GetArraySize(vins)) > 0 )

2
iguana/tests/ratifytest

@ -1,3 +1,3 @@
#!/bin/bash
#!/bin/bash
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"dpow\",\"method\":\"ratify\",\"source\":\"REVS\",\"minsigs\":8,\"start\":1478381719,\"ratified\":[{\"pubkey\":\"03b7621b44118017a16043f19b30cc8a4cfe068ac4e42417bae16ba460c80f3828\"}, {\"pubkey\":\"02ebfc784a4ba768aad88d44d1045d240d47b26e248cafaf1c5169a42d7a61d344\"}, {\"pubkey\":\"03750cf30d739cd7632f77c1c02812dd7a7181628b0558058d4755838117e05339\"}, {\"pubkey\":\"0394f3529d2e8cc69ffa7a2b55f3761e7be978fa1896ef4c55dc9c275e77e5bf5e\"}, {\"pubkey\":\"0243c1eeb3777af47187d542e5f8c84f0ac4b05cf5a7ad77faa8cb6d2d56db7823\"}, {\"pubkey\":\"02bb298844175640a34e908ffdfa2839f77aba3d5edadefee16beb107826e00063\"}, {\"pubkey\":\"02fa88e549b4b871498f892e527a5d57287916809f8cc3163f641d71c535e8df5a\"}, {\"pubkey\":\"032f799e370f06476793a122fcd623db7804898fe5aef5572095cfee6353df34bf\"}, {\"pubkey\":\"02c06fe5401faff4442ef87b7d1b56c2e5a214166615f9a2f2030c71b0cb067ae8\"}, {\"pubkey\":\"038ac67ca49a8169bcc5de83fe020071095a2c3b2bc4d1c17386977329758956d5\"}]}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"dpow\",\"method\":\"ratify\",\"source\":\"REVS\",\"minsigs\":8,\"start\":1478481719,\"ratified\":[{\"pubkey\":\"03b7621b44118017a16043f19b30cc8a4cfe068ac4e42417bae16ba460c80f3828\"}, {\"pubkey\":\"02ebfc784a4ba768aad88d44d1045d240d47b26e248cafaf1c5169a42d7a61d344\"}, {\"pubkey\":\"03750cf30d739cd7632f77c1c02812dd7a7181628b0558058d4755838117e05339\"}, {\"pubkey\":\"0394f3529d2e8cc69ffa7a2b55f3761e7be978fa1896ef4c55dc9c275e77e5bf5e\"}, {\"pubkey\":\"0243c1eeb3777af47187d542e5f8c84f0ac4b05cf5a7ad77faa8cb6d2d56db7823\"}, {\"pubkey\":\"02bb298844175640a34e908ffdfa2839f77aba3d5edadefee16beb107826e00063\"}, {\"pubkey\":\"02fa88e549b4b871498f892e527a5d57287916809f8cc3163f641d71c535e8df5a\"}, {\"pubkey\":\"032f799e370f06476793a122fcd623db7804898fe5aef5572095cfee6353df34bf\"}, {\"pubkey\":\"02c06fe5401faff4442ef87b7d1b56c2e5a214166615f9a2f2030c71b0cb067ae8\"}, {\"pubkey\":\"038ac67ca49a8169bcc5de83fe020071095a2c3b2bc4d1c17386977329758956d5\"}]}"

Loading…
Cancel
Save