lol
This commit is contained in:
@@ -17,13 +17,13 @@ BEGIN
|
|||||||
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Hush"
|
VALUE "CompanyName", "Hush"
|
||||||
VALUE "FileDescription", "komodo-cli (JSON-RPC client for Hush-flavored Komodo)"
|
VALUE "FileDescription", "hush-cli (JSON-RPC client for Hush full node)"
|
||||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||||
VALUE "InternalName", "komodo-cli"
|
VALUE "InternalName", "hush-cli"
|
||||||
VALUE "LegalCopyright", COPYRIGHT_STR
|
VALUE "LegalCopyright", COPYRIGHT_STR
|
||||||
VALUE "LegalTrademarks1", "Distributed under the GPLv3 software license, see the accompanying file COPYING or https://www.opensource.org/licenses/mit-license.php"
|
VALUE "LegalTrademarks1", "Distributed under the GPLv3 software license"
|
||||||
VALUE "OriginalFilename", "komodo-cli.exe"
|
VALUE "OriginalFilename", "hush-cli.exe"
|
||||||
VALUE "ProductName", "komodo-cli"
|
VALUE "ProductName", "hush-cli"
|
||||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
## CCLIB
|
## CCLIB
|
||||||
Please follow the below instructions to build the cryptoconditions library into the Komodo source directory `komodo/src` - supported operating systems are Linux, OSX and Windows (mingw crossbuild):
|
|
||||||
|
Please follow the below instructions to build the cryptoconditions library
|
||||||
|
|
||||||
```
|
```
|
||||||
make clean
|
make clean
|
||||||
|
|||||||
@@ -612,7 +612,7 @@ char *curl_post(CURL **cHandlep,char *url,char *userpass,char *postfields,char *
|
|||||||
return(chunk.memory);
|
return(chunk.memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t _komodo_userpass(char *username, char *password, FILE *fp)
|
uint16_t _hush_userpass(char *username, char *password, FILE *fp)
|
||||||
{
|
{
|
||||||
char *rpcuser,*rpcpassword,*str,*ipaddress,line[8192]; uint16_t port = 0;
|
char *rpcuser,*rpcpassword,*str,*ipaddress,line[8192]; uint16_t port = 0;
|
||||||
rpcuser = rpcpassword = 0;
|
rpcuser = rpcpassword = 0;
|
||||||
@@ -650,23 +650,15 @@ uint16_t _komodo_userpass(char *username, char *password, FILE *fp)
|
|||||||
return(port);
|
return(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t komodo_userpass(char *userpass,char *symbol)
|
uint16_t hush_userpass(char *userpass,char *symbol)
|
||||||
{
|
{
|
||||||
FILE *fp; uint16_t port = 0; char fname[512],username[512],password[512],confname[HUSH_SMART_CHAIN_MAXLEN];
|
FILE *fp; uint16_t port = 0; char fname[512],username[512],password[512],confname[HUSH_SMART_CHAIN_MAXLEN];
|
||||||
userpass[0] = 0;
|
userpass[0] = 0;
|
||||||
if ( strcmp("KMD",symbol) == 0 )
|
sprintf(confname,"%s.conf",symbol);
|
||||||
{
|
|
||||||
#ifdef __APPLE__
|
|
||||||
sprintf(confname,"Komodo.conf");
|
|
||||||
#else
|
|
||||||
sprintf(confname,"komodo.conf");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else sprintf(confname,"%s.conf",symbol);
|
|
||||||
//hush_statefname(fname,symbol,confname);
|
//hush_statefname(fname,symbol,confname);
|
||||||
if ( (fp= fopen(confname,"rb")) != 0 )
|
if ( (fp= fopen(confname,"rb")) != 0 )
|
||||||
{
|
{
|
||||||
port = _komodo_userpass(username,password,fp);
|
port = _hush_userpass(username,password,fp);
|
||||||
sprintf(userpass,"%s:%s",username,password);
|
sprintf(userpass,"%s:%s",username,password);
|
||||||
if ( strcmp(symbol,ASSETCHAINS_SYMBOL) == 0 )
|
if ( strcmp(symbol,ASSETCHAINS_SYMBOL) == 0 )
|
||||||
strcpy(USERPASS,userpass);
|
strcpy(USERPASS,userpass);
|
||||||
@@ -1085,7 +1077,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
strcpy(ASSETCHAINS_SYMBOL,CHAINNAME);
|
strcpy(ASSETCHAINS_SYMBOL,CHAINNAME);
|
||||||
|
|
||||||
GAMES_PORT = komodo_userpass(userpass,ASSETCHAINS_SYMBOL);
|
GAMES_PORT = hush_userpass(userpass,ASSETCHAINS_SYMBOL);
|
||||||
if ( IPADDRESS[0] == 0 )
|
if ( IPADDRESS[0] == 0 )
|
||||||
strcpy(IPADDRESS,"127.0.0.1");
|
strcpy(IPADDRESS,"127.0.0.1");
|
||||||
printf("ASSETCHAINS_SYMBOL.(%s) port.%u (%s) IPADDRESS.%s \n",ASSETCHAINS_SYMBOL,GAMES_PORT,USERPASS,IPADDRESS); sleep(1);
|
printf("ASSETCHAINS_SYMBOL.(%s) port.%u (%s) IPADDRESS.%s \n",ASSETCHAINS_SYMBOL,GAMES_PORT,USERPASS,IPADDRESS); sleep(1);
|
||||||
|
|||||||
6
src/fs.h
6
src/fs.h
@@ -3,8 +3,8 @@
|
|||||||
// Distributed under the GPLv3 software license, see the accompanying
|
// Distributed under the GPLv3 software license, see the accompanying
|
||||||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||||
|
|
||||||
#ifndef KOMODO_FS_H
|
#ifndef HUSH_FS_H
|
||||||
#define KOMODO_FS_H
|
#define HUSH_FS_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -22,4 +22,4 @@ namespace fsbridge {
|
|||||||
FILE *freopen(const fs::path& p, const char *mode, FILE *stream);
|
FILE *freopen(const fs::path& p, const char *mode, FILE *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // KOMODO_FS_H
|
#endif // HUSH_FS_H
|
||||||
|
|||||||
46
src/hush.h
46
src/hush.h
@@ -37,7 +37,7 @@ uint256 NOTARIZED_HASH,NOTARIZED_DESTTXID;
|
|||||||
#include "utlist.h"
|
#include "utlist.h"
|
||||||
|
|
||||||
int32_t gettxout_scriptPubKey(uint8_t *scriptPubkey,int32_t maxsize,uint256 txid,int32_t n);
|
int32_t gettxout_scriptPubKey(uint8_t *scriptPubkey,int32_t maxsize,uint256 txid,int32_t n);
|
||||||
void komodo_event_rewind(struct hush_state *sp,char *symbol,int32_t height);
|
void hush_event_rewind(struct hush_state *sp,char *symbol,int32_t height);
|
||||||
int32_t hush_connectblock(bool fJustCheck, CBlockIndex *pindex,CBlock& block);
|
int32_t hush_connectblock(bool fJustCheck, CBlockIndex *pindex,CBlock& block);
|
||||||
bool check_pprevnotarizedht();
|
bool check_pprevnotarizedht();
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ int32_t hush_parsestatefile(struct hush_state *sp,FILE *fp,char *symbol,char *de
|
|||||||
{
|
{
|
||||||
//printf("updated %d pubkeys at %s ht.%d\n",num,symbol,ht);
|
//printf("updated %d pubkeys at %s ht.%d\n",num,symbol,ht);
|
||||||
if ( (HUSH_EXTERNAL_NOTARIES != 0 && matched != 0) || (strcmp(symbol,"KMD") == 0 && HUSH_EXTERNAL_NOTARIES == 0) )
|
if ( (HUSH_EXTERNAL_NOTARIES != 0 && matched != 0) || (strcmp(symbol,"KMD") == 0 && HUSH_EXTERNAL_NOTARIES == 0) )
|
||||||
komodo_eventadd_pubkeys(sp,symbol,ht,num,pubkeys);
|
hush_eventadd_pubkeys(sp,symbol,ht,num,pubkeys);
|
||||||
}
|
}
|
||||||
} else printf("illegal num.%d\n",num);
|
} else printf("illegal num.%d\n",num);
|
||||||
}
|
}
|
||||||
@@ -126,7 +126,7 @@ int32_t hush_parsestatefile(struct hush_state *sp,FILE *fp,char *symbol,char *de
|
|||||||
MoMdepth = 0;
|
MoMdepth = 0;
|
||||||
}
|
}
|
||||||
//if ( matched != 0 ) global independent states -> inside *sp
|
//if ( matched != 0 ) global independent states -> inside *sp
|
||||||
komodo_eventadd_notarized(sp,symbol,ht,dest,notarized_hash,notarized_desttxid,notarized_height,MoM,MoMdepth);
|
hush_eventadd_notarized(sp,symbol,ht,dest,notarized_hash,notarized_desttxid,notarized_height,MoM,MoMdepth);
|
||||||
}
|
}
|
||||||
else if ( func == 'U' ) // deprecated
|
else if ( func == 'U' ) // deprecated
|
||||||
{
|
{
|
||||||
@@ -139,7 +139,7 @@ int32_t hush_parsestatefile(struct hush_state *sp,FILE *fp,char *symbol,char *de
|
|||||||
if ( fread(&hash,1,sizeof(hash),fp) != sizeof(hash) )
|
if ( fread(&hash,1,sizeof(hash),fp) != sizeof(hash) )
|
||||||
errs++;
|
errs++;
|
||||||
//if ( matched != 0 )
|
//if ( matched != 0 )
|
||||||
// komodo_eventadd_utxo(sp,symbol,ht,nid,hash,mask,n);
|
// hush_eventadd_utxo(sp,symbol,ht,nid,hash,mask,n);
|
||||||
}
|
}
|
||||||
else if ( func == 'K' )
|
else if ( func == 'K' )
|
||||||
{
|
{
|
||||||
@@ -148,7 +148,7 @@ int32_t hush_parsestatefile(struct hush_state *sp,FILE *fp,char *symbol,char *de
|
|||||||
errs++;
|
errs++;
|
||||||
//if ( matched != 0 ) global independent states -> inside *sp
|
//if ( matched != 0 ) global independent states -> inside *sp
|
||||||
//printf("%s.%d load[%s] ht.%d\n",SMART_CHAIN_SYMBOL,ht,symbol,kheight);
|
//printf("%s.%d load[%s] ht.%d\n",SMART_CHAIN_SYMBOL,ht,symbol,kheight);
|
||||||
komodo_eventadd_kmdheight(sp,symbol,ht,kheight,0);
|
hush_eventadd_kmdheight(sp,symbol,ht,kheight,0);
|
||||||
}
|
}
|
||||||
else if ( func == 'T' )
|
else if ( func == 'T' )
|
||||||
{
|
{
|
||||||
@@ -159,7 +159,7 @@ int32_t hush_parsestatefile(struct hush_state *sp,FILE *fp,char *symbol,char *de
|
|||||||
errs++;
|
errs++;
|
||||||
//if ( matched != 0 ) global independent states -> inside *sp
|
//if ( matched != 0 ) global independent states -> inside *sp
|
||||||
//printf("%s.%d load[%s] ht.%d t.%u\n",SMART_CHAIN_SYMBOL,ht,symbol,kheight,ktimestamp);
|
//printf("%s.%d load[%s] ht.%d t.%u\n",SMART_CHAIN_SYMBOL,ht,symbol,kheight,ktimestamp);
|
||||||
komodo_eventadd_kmdheight(sp,symbol,ht,kheight,ktimestamp);
|
hush_eventadd_kmdheight(sp,symbol,ht,kheight,ktimestamp);
|
||||||
}
|
}
|
||||||
else if ( func == 'R' )
|
else if ( func == 'R' )
|
||||||
{
|
{
|
||||||
@@ -182,7 +182,7 @@ int32_t hush_parsestatefile(struct hush_state *sp,FILE *fp,char *symbol,char *de
|
|||||||
printf("%02x",opret[i]);
|
printf("%02x",opret[i]);
|
||||||
printf(" %s.%d load[%s] opret[%c] len.%d %.8f\n",SMART_CHAIN_SYMBOL,ht,symbol,opret[0],olen,(double)ovalue/COIN);
|
printf(" %s.%d load[%s] opret[%c] len.%d %.8f\n",SMART_CHAIN_SYMBOL,ht,symbol,opret[0],olen,(double)ovalue/COIN);
|
||||||
}
|
}
|
||||||
komodo_eventadd_opreturn(sp,symbol,ht,txid,ovalue,v,opret,olen); // global shared state -> global PAX
|
hush_eventadd_opreturn(sp,symbol,ht,txid,ovalue,v,opret,olen); // global shared state -> global PAX
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
@@ -203,7 +203,7 @@ int32_t hush_parsestatefile(struct hush_state *sp,FILE *fp,char *symbol,char *de
|
|||||||
{
|
{
|
||||||
//if ( matched != 0 ) global shared state -> global PVALS
|
//if ( matched != 0 ) global shared state -> global PVALS
|
||||||
//printf("%s load[%s] prices %d\n",SMART_CHAIN_SYMBOL,symbol,ht);
|
//printf("%s load[%s] prices %d\n",SMART_CHAIN_SYMBOL,symbol,ht);
|
||||||
komodo_eventadd_pricefeed(sp,symbol,ht,pvals,numpvals);
|
hush_eventadd_pricefeed(sp,symbol,ht,pvals,numpvals);
|
||||||
//printf("load pvals ht.%d numpvals.%d\n",ht,numpvals);
|
//printf("load pvals ht.%d numpvals.%d\n",ht,numpvals);
|
||||||
} else printf("error loading pvals[%d]\n",numpvals);
|
} else printf("error loading pvals[%d]\n",numpvals);
|
||||||
} // else printf("[%s] %s illegal func.(%d %c)\n",SMART_CHAIN_SYMBOL,symbol,func,func);
|
} // else printf("[%s] %s illegal func.(%d %c)\n",SMART_CHAIN_SYMBOL,symbol,func,func);
|
||||||
@@ -244,7 +244,7 @@ int32_t hush_parsestatefiledata(struct hush_state *sp,uint8_t *filedata,long *fp
|
|||||||
{
|
{
|
||||||
//printf("updated %d pubkeys at %s ht.%d\n",num,symbol,ht);
|
//printf("updated %d pubkeys at %s ht.%d\n",num,symbol,ht);
|
||||||
if ( (HUSH_EXTERNAL_NOTARIES != 0 && matched != 0) || (strcmp(symbol,"KMD") == 0 && HUSH_EXTERNAL_NOTARIES == 0) )
|
if ( (HUSH_EXTERNAL_NOTARIES != 0 && matched != 0) || (strcmp(symbol,"KMD") == 0 && HUSH_EXTERNAL_NOTARIES == 0) )
|
||||||
komodo_eventadd_pubkeys(sp,symbol,ht,num,pubkeys);
|
hush_eventadd_pubkeys(sp,symbol,ht,num,pubkeys);
|
||||||
}
|
}
|
||||||
} else printf("illegal num.%d\n",num);
|
} else printf("illegal num.%d\n",num);
|
||||||
}
|
}
|
||||||
@@ -270,7 +270,7 @@ int32_t hush_parsestatefiledata(struct hush_state *sp,uint8_t *filedata,long *fp
|
|||||||
memset(&MoM,0,sizeof(MoM));
|
memset(&MoM,0,sizeof(MoM));
|
||||||
MoMdepth = 0;
|
MoMdepth = 0;
|
||||||
}
|
}
|
||||||
komodo_eventadd_notarized(sp,symbol,ht,dest,notarized_hash,notarized_desttxid,notarized_height,MoM,MoMdepth);
|
hush_eventadd_notarized(sp,symbol,ht,dest,notarized_hash,notarized_desttxid,notarized_height,MoM,MoMdepth);
|
||||||
}
|
}
|
||||||
else if ( func == 'U' ) // deprecated
|
else if ( func == 'U' ) // deprecated
|
||||||
{
|
{
|
||||||
@@ -288,7 +288,7 @@ int32_t hush_parsestatefiledata(struct hush_state *sp,uint8_t *filedata,long *fp
|
|||||||
int32_t kheight;
|
int32_t kheight;
|
||||||
if ( memread(&kheight,sizeof(kheight),filedata,&fpos,datalen) != sizeof(kheight) )
|
if ( memread(&kheight,sizeof(kheight),filedata,&fpos,datalen) != sizeof(kheight) )
|
||||||
errs++;
|
errs++;
|
||||||
komodo_eventadd_kmdheight(sp,symbol,ht,kheight,0);
|
hush_eventadd_kmdheight(sp,symbol,ht,kheight,0);
|
||||||
}
|
}
|
||||||
else if ( func == 'T' )
|
else if ( func == 'T' )
|
||||||
{
|
{
|
||||||
@@ -299,7 +299,7 @@ int32_t hush_parsestatefiledata(struct hush_state *sp,uint8_t *filedata,long *fp
|
|||||||
errs++;
|
errs++;
|
||||||
//if ( matched != 0 ) global independent states -> inside *sp
|
//if ( matched != 0 ) global independent states -> inside *sp
|
||||||
//printf("%s.%d load[%s] ht.%d t.%u\n",SMART_CHAIN_SYMBOL,ht,symbol,kheight,ktimestamp);
|
//printf("%s.%d load[%s] ht.%d t.%u\n",SMART_CHAIN_SYMBOL,ht,symbol,kheight,ktimestamp);
|
||||||
komodo_eventadd_kmdheight(sp,symbol,ht,kheight,ktimestamp);
|
hush_eventadd_kmdheight(sp,symbol,ht,kheight,ktimestamp);
|
||||||
}
|
}
|
||||||
else if ( func == 'R' )
|
else if ( func == 'R' )
|
||||||
{
|
{
|
||||||
@@ -322,7 +322,7 @@ int32_t hush_parsestatefiledata(struct hush_state *sp,uint8_t *filedata,long *fp
|
|||||||
printf("%02x",opret[i]);
|
printf("%02x",opret[i]);
|
||||||
printf(" %s.%d load[%s] opret[%c] len.%d %.8f\n",SMART_CHAIN_SYMBOL,ht,symbol,opret[0],olen,(double)ovalue/COIN);
|
printf(" %s.%d load[%s] opret[%c] len.%d %.8f\n",SMART_CHAIN_SYMBOL,ht,symbol,opret[0],olen,(double)ovalue/COIN);
|
||||||
}
|
}
|
||||||
komodo_eventadd_opreturn(sp,symbol,ht,txid,ovalue,v,opret,olen); // global shared state -> global PAX
|
hush_eventadd_opreturn(sp,symbol,ht,txid,ovalue,v,opret,olen); // global shared state -> global PAX
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
@@ -343,7 +343,7 @@ int32_t hush_parsestatefiledata(struct hush_state *sp,uint8_t *filedata,long *fp
|
|||||||
{
|
{
|
||||||
//if ( matched != 0 ) global shared state -> global PVALS
|
//if ( matched != 0 ) global shared state -> global PVALS
|
||||||
//printf("%s load[%s] prices %d\n",SMART_CHAIN_SYMBOL,symbol,ht);
|
//printf("%s load[%s] prices %d\n",SMART_CHAIN_SYMBOL,symbol,ht);
|
||||||
komodo_eventadd_pricefeed(sp,symbol,ht,pvals,numpvals);
|
hush_eventadd_pricefeed(sp,symbol,ht,pvals,numpvals);
|
||||||
//printf("load pvals ht.%d numpvals.%d\n",ht,numpvals);
|
//printf("load pvals ht.%d numpvals.%d\n",ht,numpvals);
|
||||||
} else printf("error loading pvals[%d]\n",numpvals);
|
} else printf("error loading pvals[%d]\n",numpvals);
|
||||||
} // else printf("[%s] %s illegal func.(%d %c)\n",SMART_CHAIN_SYMBOL,symbol,func,func);
|
} // else printf("[%s] %s illegal func.(%d %c)\n",SMART_CHAIN_SYMBOL,symbol,func,func);
|
||||||
@@ -414,7 +414,7 @@ void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotarie
|
|||||||
if ( fwrite(&KMDheight,1,sizeof(KMDheight),fp) != sizeof(KMDheight) )
|
if ( fwrite(&KMDheight,1,sizeof(KMDheight),fp) != sizeof(KMDheight) )
|
||||||
errs++;
|
errs++;
|
||||||
}
|
}
|
||||||
komodo_eventadd_kmdheight(sp,symbol,height,KMDheight,KMDtimestamp);
|
hush_eventadd_kmdheight(sp,symbol,height,KMDheight,KMDtimestamp);
|
||||||
}
|
}
|
||||||
else if ( opretbuf != 0 && opretlen > 0 )
|
else if ( opretbuf != 0 && opretlen > 0 )
|
||||||
{
|
{
|
||||||
@@ -434,7 +434,7 @@ void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotarie
|
|||||||
errs++;
|
errs++;
|
||||||
//printf("create ht.%d R opret[%d] sp.%p\n",height,olen,sp);
|
//printf("create ht.%d R opret[%d] sp.%p\n",height,olen,sp);
|
||||||
//komodo_opreturn(height,opretvalue,opretbuf,olen,txhash,vout);
|
//komodo_opreturn(height,opretvalue,opretbuf,olen,txhash,vout);
|
||||||
komodo_eventadd_opreturn(sp,symbol,height,txhash,opretvalue,vout,opretbuf,olen);
|
hush_eventadd_opreturn(sp,symbol,height,txhash,opretvalue,vout,opretbuf,olen);
|
||||||
}
|
}
|
||||||
else if ( notarypubs != 0 && numnotaries > 0 )
|
else if ( notarypubs != 0 && numnotaries > 0 )
|
||||||
{
|
{
|
||||||
@@ -445,7 +445,7 @@ void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotarie
|
|||||||
fputc(numnotaries,fp);
|
fputc(numnotaries,fp);
|
||||||
if ( fwrite(notarypubs,33,numnotaries,fp) != numnotaries )
|
if ( fwrite(notarypubs,33,numnotaries,fp) != numnotaries )
|
||||||
errs++;
|
errs++;
|
||||||
komodo_eventadd_pubkeys(sp,symbol,height,numnotaries,notarypubs);
|
hush_eventadd_pubkeys(sp,symbol,height,numnotaries,notarypubs);
|
||||||
}
|
}
|
||||||
else if ( voutmask != 0 && numvouts > 0 )
|
else if ( voutmask != 0 && numvouts > 0 )
|
||||||
{
|
{
|
||||||
@@ -459,7 +459,7 @@ void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotarie
|
|||||||
errs++;
|
errs++;
|
||||||
if ( fwrite(&txhash,1,sizeof(txhash),fp) != sizeof(txhash) )
|
if ( fwrite(&txhash,1,sizeof(txhash),fp) != sizeof(txhash) )
|
||||||
errs++;
|
errs++;
|
||||||
//komodo_eventadd_utxo(sp,symbol,height,notaryid,txhash,voutmask,numvouts);
|
//hush_eventadd_utxo(sp,symbol,height,notaryid,txhash,voutmask,numvouts);
|
||||||
}
|
}
|
||||||
else if ( pvals != 0 && numpvals > 0 )
|
else if ( pvals != 0 && numpvals > 0 )
|
||||||
{
|
{
|
||||||
@@ -475,7 +475,7 @@ void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotarie
|
|||||||
fputc(numpvals,fp);
|
fputc(numpvals,fp);
|
||||||
if ( fwrite(pvals,sizeof(uint32_t),numpvals,fp) != numpvals )
|
if ( fwrite(pvals,sizeof(uint32_t),numpvals,fp) != numpvals )
|
||||||
errs++;
|
errs++;
|
||||||
komodo_eventadd_pricefeed(sp,symbol,height,pvals,numpvals);
|
hush_eventadd_pricefeed(sp,symbol,height,pvals,numpvals);
|
||||||
//printf("ht.%d V numpvals[%d]\n",height,numpvals);
|
//printf("ht.%d V numpvals[%d]\n",height,numpvals);
|
||||||
}
|
}
|
||||||
//printf("save pvals height.%d numpvals.%d\n",height,numpvals);
|
//printf("save pvals height.%d numpvals.%d\n",height,numpvals);
|
||||||
@@ -503,7 +503,7 @@ void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotarie
|
|||||||
if ( fwrite(&sp->MoMdepth,1,sizeof(sp->MoMdepth),fp) != sizeof(sp->MoMdepth) )
|
if ( fwrite(&sp->MoMdepth,1,sizeof(sp->MoMdepth),fp) != sizeof(sp->MoMdepth) )
|
||||||
errs++;
|
errs++;
|
||||||
}
|
}
|
||||||
komodo_eventadd_notarized(sp,symbol,height,dest,sp->NOTARIZED_HASH,sp->NOTARIZED_DESTTXID,sp->NOTARIZED_HEIGHT,sp->MoM,sp->MoMdepth);
|
hush_eventadd_notarized(sp,symbol,height,dest,sp->NOTARIZED_HASH,sp->NOTARIZED_DESTTXID,sp->NOTARIZED_HEIGHT,sp->MoM,sp->MoMdepth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fflush(fp);
|
fflush(fp);
|
||||||
@@ -585,7 +585,7 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar
|
|||||||
}
|
}
|
||||||
if ( scriptbuf[len++] == 0x6a )
|
if ( scriptbuf[len++] == 0x6a )
|
||||||
{
|
{
|
||||||
struct komodo_ccdata ccdata; struct komodo_ccdataMoMoM MoMoMdata;
|
struct hush_ccdata ccdata; struct hush_ccdataMoMoM MoMoMdata;
|
||||||
int32_t validated = 0,nameoffset,opoffset = 0;
|
int32_t validated = 0,nameoffset,opoffset = 0;
|
||||||
if ( (opretlen= scriptbuf[len++]) == 0x4c )
|
if ( (opretlen= scriptbuf[len++]) == 0x4c )
|
||||||
opretlen = scriptbuf[len++];
|
opretlen = scriptbuf[len++];
|
||||||
@@ -673,7 +673,7 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar
|
|||||||
MoMoMdata.len += sizeof(MoMoMdata.MoMoM) + sizeof(uint32_t)*4;
|
MoMoMdata.len += sizeof(MoMoMdata.MoMoM) + sizeof(uint32_t)*4;
|
||||||
if ( len+MoMoMdata.numpairs*8-opoffset == opretlen )
|
if ( len+MoMoMdata.numpairs*8-opoffset == opretlen )
|
||||||
{
|
{
|
||||||
MoMoMdata.pairs = (struct komodo_ccdatapair *)calloc(MoMoMdata.numpairs,sizeof(*MoMoMdata.pairs));
|
MoMoMdata.pairs = (struct hush_ccdatapair *)calloc(MoMoMdata.numpairs,sizeof(*MoMoMdata.pairs));
|
||||||
for (k=0; k<MoMoMdata.numpairs; k++)
|
for (k=0; k<MoMoMdata.numpairs; k++)
|
||||||
{
|
{
|
||||||
len += dragon_rwnum(0,&scriptbuf[len],sizeof(int32_t),(uint8_t *)&MoMoMdata.pairs[k].notarized_height);
|
len += dragon_rwnum(0,&scriptbuf[len],sizeof(int32_t),(uint8_t *)&MoMoMdata.pairs[k].notarized_height);
|
||||||
@@ -841,7 +841,7 @@ int32_t hush_connectblock(bool fJustCheck, CBlockIndex *pindex,CBlock& block)
|
|||||||
}
|
}
|
||||||
if (!fJustCheck)
|
if (!fJustCheck)
|
||||||
{
|
{
|
||||||
komodo_event_rewind(sp,symbol,pindex->GetHeight());
|
hush_event_rewind(sp,symbol,pindex->GetHeight());
|
||||||
hush_stateupdate(pindex->GetHeight(),0,0,0,zero,0,0,0,0,-pindex->GetHeight(),pindex->nTime,0,0,0,0,zero,0);
|
hush_stateupdate(pindex->GetHeight(),0,0,0,zero,0,0,0,0,-pindex->GetHeight(),pindex->nTime,0,0,0,0,zero,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#ifndef H_HUSHCCDATA_H
|
#ifndef H_HUSHCCDATA_H
|
||||||
#define H_HUSHCCDATA_H
|
#define H_HUSHCCDATA_H
|
||||||
|
|
||||||
struct komodo_ccdata *CC_data;
|
struct hush_ccdata *CC_data;
|
||||||
int32_t CC_firstheight;
|
int32_t CC_firstheight;
|
||||||
|
|
||||||
uint256 BuildMerkleTree(bool* fMutated, const std::vector<uint256> leaves, std::vector<uint256> &vMerkleTree);
|
uint256 BuildMerkleTree(bool* fMutated, const std::vector<uint256> leaves, std::vector<uint256> &vMerkleTree);
|
||||||
@@ -41,9 +41,9 @@ uint256 komodo_calcMoM(int32_t height,int32_t MoMdepth)
|
|||||||
return BuildMerkleTree(&fMutated, leaves, tree);
|
return BuildMerkleTree(&fMutated, leaves, tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct komodo_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t kmdstarti,int32_t kmdendi)
|
struct hush_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t kmdstarti,int32_t kmdendi)
|
||||||
{
|
{
|
||||||
struct komodo_ccdata_entry *allMoMs=0; struct komodo_ccdata *ccdata,*tmpptr; int32_t i,num,max;
|
struct hush_ccdata_entry *allMoMs=0; struct hush_ccdata *ccdata,*tmpptr; int32_t i,num,max;
|
||||||
bool fMutated; std::vector<uint256> tree, leaves;
|
bool fMutated; std::vector<uint256> tree, leaves;
|
||||||
num = max = 0;
|
num = max = 0;
|
||||||
portable_mutex_lock(&HUSH_CC_mutex);
|
portable_mutex_lock(&HUSH_CC_mutex);
|
||||||
@@ -54,7 +54,7 @@ struct komodo_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t
|
|||||||
if ( num >= max )
|
if ( num >= max )
|
||||||
{
|
{
|
||||||
max += 100;
|
max += 100;
|
||||||
allMoMs = (struct komodo_ccdata_entry *)realloc(allMoMs,max * sizeof(*allMoMs));
|
allMoMs = (struct hush_ccdata_entry *)realloc(allMoMs,max * sizeof(*allMoMs));
|
||||||
}
|
}
|
||||||
allMoMs[num].MoM = ccdata->MoMdata.MoM;
|
allMoMs[num].MoM = ccdata->MoMdata.MoM;
|
||||||
allMoMs[num].notarized_height = ccdata->MoMdata.notarized_height;
|
allMoMs[num].notarized_height = ccdata->MoMdata.notarized_height;
|
||||||
@@ -81,13 +81,13 @@ struct komodo_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t
|
|||||||
return(allMoMs);
|
return(allMoMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t komodo_addpair(struct komodo_ccdataMoMoM *mdata,int32_t notarized_height,int32_t offset,int32_t maxpairs)
|
int32_t komodo_addpair(struct hush_ccdataMoMoM *mdata,int32_t notarized_height,int32_t offset,int32_t maxpairs)
|
||||||
{
|
{
|
||||||
if ( maxpairs >= 0) {
|
if ( maxpairs >= 0) {
|
||||||
if ( mdata->numpairs >= maxpairs )
|
if ( mdata->numpairs >= maxpairs )
|
||||||
{
|
{
|
||||||
maxpairs += 100;
|
maxpairs += 100;
|
||||||
mdata->pairs = (struct komodo_ccdatapair *)realloc(mdata->pairs,sizeof(*mdata->pairs)*maxpairs);
|
mdata->pairs = (struct hush_ccdatapair *)realloc(mdata->pairs,sizeof(*mdata->pairs)*maxpairs);
|
||||||
//fprintf(stderr,"pairs reallocated to %p num.%d\n",mdata->pairs,mdata->numpairs);
|
//fprintf(stderr,"pairs reallocated to %p num.%d\n",mdata->pairs,mdata->numpairs);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -100,9 +100,9 @@ int32_t komodo_addpair(struct komodo_ccdataMoMoM *mdata,int32_t notarized_height
|
|||||||
return(maxpairs);
|
return(maxpairs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t hush_MoMoMdata(char *hexstr,int32_t hexsize,struct komodo_ccdataMoMoM *mdata,char *symbol,int32_t kmdheight,int32_t notarized_height)
|
int32_t hush_MoMoMdata(char *hexstr,int32_t hexsize,struct hush_ccdataMoMoM *mdata,char *symbol,int32_t kmdheight,int32_t notarized_height)
|
||||||
{
|
{
|
||||||
uint8_t hexdata[8192]; struct komodo_ccdata *ccdata,*tmpptr; int32_t len,maxpairs,i,retval=-1,depth,starti,endi,CCid=0; struct komodo_ccdata_entry *allMoMs;
|
uint8_t hexdata[8192]; struct hush_ccdata *ccdata,*tmpptr; int32_t len,maxpairs,i,retval=-1,depth,starti,endi,CCid=0; struct hush_ccdata_entry *allMoMs;
|
||||||
starti = endi = depth = len = maxpairs = 0;
|
starti = endi = depth = len = maxpairs = 0;
|
||||||
hexstr[0] = 0;
|
hexstr[0] = 0;
|
||||||
if ( sizeof(hexdata)*2+1 > hexsize )
|
if ( sizeof(hexdata)*2+1 > hexsize )
|
||||||
@@ -181,7 +181,7 @@ int32_t hush_MoMoMdata(char *hexstr,int32_t hexsize,struct komodo_ccdataMoMoM *m
|
|||||||
|
|
||||||
void komodo_purge_ccdata(int32_t height)
|
void komodo_purge_ccdata(int32_t height)
|
||||||
{
|
{
|
||||||
struct komodo_ccdata *ccdata,*tmpptr;
|
struct hush_ccdata *ccdata,*tmpptr;
|
||||||
if ( SMART_CHAIN_SYMBOL[0] == 0 )
|
if ( SMART_CHAIN_SYMBOL[0] == 0 )
|
||||||
{
|
{
|
||||||
portable_mutex_lock(&HUSH_CC_mutex);
|
portable_mutex_lock(&HUSH_CC_mutex);
|
||||||
@@ -203,9 +203,9 @@ void komodo_purge_ccdata(int32_t height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this is just a demo of ccdata processing to create example data for the MoMoM and allMoMs calls
|
// this is just a demo of ccdata processing to create example data for the MoMoM and allMoMs calls
|
||||||
int32_t komodo_rwccdata(char *thischain,int32_t rwflag,struct komodo_ccdata *ccdata,struct komodo_ccdataMoMoM *MoMoMdata)
|
int32_t komodo_rwccdata(char *thischain,int32_t rwflag,struct hush_ccdata *ccdata,struct hush_ccdataMoMoM *MoMoMdata)
|
||||||
{
|
{
|
||||||
uint256 hash,zero; bits256 tmp; int32_t i,nonz; struct komodo_ccdata *ptr; struct notarized_checkpoint *np;
|
uint256 hash,zero; bits256 tmp; int32_t i,nonz; struct hush_ccdata *ptr; struct notarized_checkpoint *np;
|
||||||
return(0); // disable this path as libscott method is much better
|
return(0); // disable this path as libscott method is much better
|
||||||
if ( rwflag == 0 )
|
if ( rwflag == 0 )
|
||||||
{
|
{
|
||||||
@@ -234,7 +234,7 @@ int32_t komodo_rwccdata(char *thischain,int32_t rwflag,struct komodo_ccdata *ccd
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptr = (struct komodo_ccdata *)calloc(1,sizeof(*ptr));
|
ptr = (struct hush_ccdata *)calloc(1,sizeof(*ptr));
|
||||||
*ptr = *ccdata;
|
*ptr = *ccdata;
|
||||||
portable_mutex_lock(&HUSH_CC_mutex);
|
portable_mutex_lock(&HUSH_CC_mutex);
|
||||||
DL_PREPEND(CC_data,ptr);
|
DL_PREPEND(CC_data,ptr);
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
#define CRYPTO555_HUSHADDR "RFetqf8WUfWnwNeXdknkm8ojk7EXnYFzrv"
|
#define CRYPTO555_HUSHADDR "RFetqf8WUfWnwNeXdknkm8ojk7EXnYFzrv"
|
||||||
#define CRYPTO555_RMD160STR "deadbeefbadcaca748c4986b240ff7d7bc3fffb0"
|
#define CRYPTO555_RMD160STR "deadbeefbadcaca748c4986b240ff7d7bc3fffb0"
|
||||||
#define HUSH_FIRSTFUNGIBLEID 100
|
#define HUSH_FIRSTFUNGIBLEID 100
|
||||||
#define KOMODO_SAPLING_ACTIVATION 1544832000 // Dec 15th, 2018
|
#define HUSH_SAPING_ACTIVATION 1544832000 // Dec 15th, 2018
|
||||||
#define KOMODO_SAPLING_DEADLINE 1550188800 // Feb 15th, 2019
|
#define HUSH_SAPING_DEADLINE 1550188800 // Feb 15th, 2019
|
||||||
#define _COINBASE_MATURITY 100
|
#define _COINBASE_MATURITY 100
|
||||||
|
|
||||||
// Notary Seasons: To add seasons, change NUM_HUSH_SEASONS, and add timestamp and height of activation to these arrays.
|
// Notary Seasons: To add seasons, change NUM_HUSH_SEASONS, and add timestamp and height of activation to these arrays.
|
||||||
@@ -479,7 +479,7 @@ static const char *notaries_elected[NUM_HUSH_SEASONS][NUM_HUSH_NOTARIES][2] =
|
|||||||
#define GETBIT(bits,bitoffset) (((uint8_t *)bits)[(bitoffset) >> 3] & (1 << ((bitoffset) & 7)))
|
#define GETBIT(bits,bitoffset) (((uint8_t *)bits)[(bitoffset) >> 3] & (1 << ((bitoffset) & 7)))
|
||||||
#define CLEARBIT(bits,bitoffset) (((uint8_t *)bits)[(bitoffset) >> 3] &= ~(1 << ((bitoffset) & 7)))
|
#define CLEARBIT(bits,bitoffset) (((uint8_t *)bits)[(bitoffset) >> 3] &= ~(1 << ((bitoffset) & 7)))
|
||||||
|
|
||||||
#define KOMODO_MAXNVALUE (((uint64_t)1 << 63) - 1)
|
#define HUSH_MAXNVALUE (((uint64_t)1 << 63) - 1)
|
||||||
#define KOMODO_BIT63SET(x) ((x) & ((uint64_t)1 << 63))
|
#define KOMODO_BIT63SET(x) ((x) & ((uint64_t)1 << 63))
|
||||||
#define KOMODO_VALUETOOBIG(x) ((x) > (uint64_t)10000000001*COIN)
|
#define KOMODO_VALUETOOBIG(x) ((x) > (uint64_t)10000000001*COIN)
|
||||||
|
|
||||||
@@ -504,7 +504,7 @@ extern int32_t KOMODO_BLOCK_POSUNITS, KOMODO_CONSECUTIVE_POS_THRESHOLD, KOMODO_N
|
|||||||
extern uint64_t ASSETCHAINS_TIMELOCKGTE;
|
extern uint64_t ASSETCHAINS_TIMELOCKGTE;
|
||||||
extern uint32_t ASSETCHAINS_ALGO,ASSETCHAINS_EQUIHASH,HUSH_INITDONE;
|
extern uint32_t ASSETCHAINS_ALGO,ASSETCHAINS_EQUIHASH,HUSH_INITDONE;
|
||||||
|
|
||||||
extern int32_t HUSH_MININGTHREADS,HUSH_LONGESTCHAIN,ASSETCHAINS_SEED,IS_HUSH_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,KOMODO_ON_DEMAND,HUSH_PASSPORT_INITDONE,ASSETCHAINS_STAKED,HUSH_NSPV;
|
extern int32_t HUSH_MININGTHREADS,HUSH_LONGESTCHAIN,ASSETCHAINS_SEED,IS_HUSH_NOTARY,USE_EXTERNAL_PUBKEY,HUSH_CHOSEN_ONE,KOMODO_ON_DEMAND,HUSH_PASSPORT_INITDONE,ASSETCHAINS_STAKED,HUSH_NSPV;
|
||||||
extern uint64_t ASSETCHAINS_COMMISSION, ASSETCHAINS_LASTERA,ASSETCHAINS_CBOPRET;
|
extern uint64_t ASSETCHAINS_COMMISSION, ASSETCHAINS_LASTERA,ASSETCHAINS_CBOPRET;
|
||||||
extern uint64_t ASSETCHAINS_REWARD[ASSETCHAINS_MAX_ERAS+1], ASSETCHAINS_NOTARY_PAY[ASSETCHAINS_MAX_ERAS+1], ASSETCHAINS_TIMELOCKGTE, ASSETCHAINS_NONCEMASK[],ASSETCHAINS_NK[2];
|
extern uint64_t ASSETCHAINS_REWARD[ASSETCHAINS_MAX_ERAS+1], ASSETCHAINS_NOTARY_PAY[ASSETCHAINS_MAX_ERAS+1], ASSETCHAINS_TIMELOCKGTE, ASSETCHAINS_NONCEMASK[],ASSETCHAINS_NK[2];
|
||||||
extern const char *ASSETCHAINS_ALGORITHMS[];
|
extern const char *ASSETCHAINS_ALGORITHMS[];
|
||||||
|
|||||||
@@ -20,29 +20,29 @@
|
|||||||
#define H_HUSHEVENTS_H
|
#define H_HUSHEVENTS_H
|
||||||
#include "hush_defs.h"
|
#include "hush_defs.h"
|
||||||
|
|
||||||
struct komodo_event *komodo_eventadd(struct hush_state *sp,int32_t height,char *symbol,uint8_t type,uint8_t *data,uint16_t datalen)
|
struct hush_event *hush_eventadd(struct hush_state *sp,int32_t height,char *symbol,uint8_t type,uint8_t *data,uint16_t datalen)
|
||||||
{
|
{
|
||||||
struct komodo_event *ep=0; uint16_t len = (uint16_t)(sizeof(*ep) + datalen);
|
struct hush_event *ep=0; uint16_t len = (uint16_t)(sizeof(*ep) + datalen);
|
||||||
if ( sp != 0 && SMART_CHAIN_SYMBOL[0] != 0 )
|
if ( sp != 0 && SMART_CHAIN_SYMBOL[0] != 0 )
|
||||||
{
|
{
|
||||||
portable_mutex_lock(&komodo_mutex);
|
portable_mutex_lock(&komodo_mutex);
|
||||||
ep = (struct komodo_event *)calloc(1,len);
|
ep = (struct hush_event *)calloc(1,len);
|
||||||
ep->len = len;
|
ep->len = len;
|
||||||
ep->height = height;
|
ep->height = height;
|
||||||
ep->type = type;
|
ep->type = type;
|
||||||
strcpy(ep->symbol,symbol);
|
strcpy(ep->symbol,symbol);
|
||||||
if ( datalen != 0 )
|
if ( datalen != 0 )
|
||||||
memcpy(ep->space,data,datalen);
|
memcpy(ep->space,data,datalen);
|
||||||
sp->Komodo_events = (struct komodo_event **)realloc(sp->Komodo_events,(1 + sp->Komodo_numevents) * sizeof(*sp->Komodo_events));
|
sp->Hush_events = (struct hush_event **)realloc(sp->Hush_events,(1 + sp->Komodo_numevents) * sizeof(*sp->Hush_events));
|
||||||
sp->Komodo_events[sp->Komodo_numevents++] = ep;
|
sp->Hush_events[sp->Komodo_numevents++] = ep;
|
||||||
portable_mutex_unlock(&komodo_mutex);
|
portable_mutex_unlock(&komodo_mutex);
|
||||||
}
|
}
|
||||||
return(ep);
|
return(ep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void komodo_eventadd_notarized(struct hush_state *sp,char *symbol,int32_t height,char *dest,uint256 notarized_hash,uint256 notarized_desttxid,int32_t notarizedheight,uint256 MoM,int32_t MoMdepth)
|
void hush_eventadd_notarized(struct hush_state *sp,char *symbol,int32_t height,char *dest,uint256 notarized_hash,uint256 notarized_desttxid,int32_t notarizedheight,uint256 MoM,int32_t MoMdepth)
|
||||||
{
|
{
|
||||||
static uint32_t counter; int32_t verified=0; char *coin; struct komodo_event_notarized N;
|
static uint32_t counter; int32_t verified=0; char *coin; struct hush_event_notarized N;
|
||||||
coin = (SMART_CHAIN_SYMBOL[0] == 0) ? (char *)"KMD" : SMART_CHAIN_SYMBOL;
|
coin = (SMART_CHAIN_SYMBOL[0] == 0) ? (char *)"KMD" : SMART_CHAIN_SYMBOL;
|
||||||
if ( IS_HUSH_NOTARY != 0 && (verified= komodo_verifynotarization(symbol,dest,height,notarizedheight,notarized_hash,notarized_desttxid)) < 0 )
|
if ( IS_HUSH_NOTARY != 0 && (verified= komodo_verifynotarization(symbol,dest,height,notarizedheight,notarized_hash,notarized_desttxid)) < 0 )
|
||||||
{
|
{
|
||||||
@@ -60,41 +60,41 @@ void komodo_eventadd_notarized(struct hush_state *sp,char *symbol,int32_t height
|
|||||||
N.MoM = MoM;
|
N.MoM = MoM;
|
||||||
N.MoMdepth = MoMdepth;
|
N.MoMdepth = MoMdepth;
|
||||||
strncpy(N.dest,dest,sizeof(N.dest)-1);
|
strncpy(N.dest,dest,sizeof(N.dest)-1);
|
||||||
komodo_eventadd(sp,height,symbol,KOMODO_EVENT_NOTARIZED,(uint8_t *)&N,sizeof(N));
|
hush_eventadd(sp,height,symbol,HUSH_EVENT_NOTARIZED,(uint8_t *)&N,sizeof(N));
|
||||||
if ( sp != 0 )
|
if ( sp != 0 )
|
||||||
komodo_notarized_update(sp,height,notarizedheight,notarized_hash,notarized_desttxid,MoM,MoMdepth);
|
komodo_notarized_update(sp,height,notarizedheight,notarized_hash,notarized_desttxid,MoM,MoMdepth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void komodo_eventadd_pubkeys(struct hush_state *sp,char *symbol,int32_t height,uint8_t num,uint8_t pubkeys[64][33])
|
void hush_eventadd_pubkeys(struct hush_state *sp,char *symbol,int32_t height,uint8_t num,uint8_t pubkeys[64][33])
|
||||||
{
|
{
|
||||||
struct komodo_event_pubkeys P;
|
struct hush_event_pubkeys P;
|
||||||
//printf("eventadd pubkeys ht.%d\n",height);
|
//printf("eventadd pubkeys ht.%d\n",height);
|
||||||
memset(&P,0,sizeof(P));
|
memset(&P,0,sizeof(P));
|
||||||
P.num = num;
|
P.num = num;
|
||||||
memcpy(P.pubkeys,pubkeys,33 * num);
|
memcpy(P.pubkeys,pubkeys,33 * num);
|
||||||
komodo_eventadd(sp,height,symbol,KOMODO_EVENT_RATIFY,(uint8_t *)&P,(int32_t)(sizeof(P.num) + 33 * num));
|
hush_eventadd(sp,height,symbol,HUSH_EVENT_RATIFY,(uint8_t *)&P,(int32_t)(sizeof(P.num) + 33 * num));
|
||||||
if ( sp != 0 )
|
if ( sp != 0 )
|
||||||
komodo_notarysinit(height,pubkeys,num);
|
komodo_notarysinit(height,pubkeys,num);
|
||||||
}
|
}
|
||||||
|
|
||||||
void komodo_eventadd_pricefeed(struct hush_state *sp,char *symbol,int32_t height,uint32_t *prices,uint8_t num)
|
void hush_eventadd_pricefeed(struct hush_state *sp,char *symbol,int32_t height,uint32_t *prices,uint8_t num)
|
||||||
{
|
{
|
||||||
struct komodo_event_pricefeed F;
|
struct hush_event_pricefeed F;
|
||||||
if ( num == sizeof(F.prices)/sizeof(*F.prices) )
|
if ( num == sizeof(F.prices)/sizeof(*F.prices) )
|
||||||
{
|
{
|
||||||
memset(&F,0,sizeof(F));
|
memset(&F,0,sizeof(F));
|
||||||
F.num = num;
|
F.num = num;
|
||||||
memcpy(F.prices,prices,sizeof(*F.prices) * num);
|
memcpy(F.prices,prices,sizeof(*F.prices) * num);
|
||||||
komodo_eventadd(sp,height,symbol,KOMODO_EVENT_PRICEFEED,(uint8_t *)&F,(int32_t)(sizeof(F.num) + sizeof(*F.prices) * num));
|
hush_eventadd(sp,height,symbol,HUSH_EVENT_PRICEFEED,(uint8_t *)&F,(int32_t)(sizeof(F.num) + sizeof(*F.prices) * num));
|
||||||
if ( sp != 0 )
|
if ( sp != 0 )
|
||||||
komodo_pvals(height,prices,num);
|
komodo_pvals(height,prices,num);
|
||||||
} //else fprintf(stderr,"skip pricefeed[%d]\n",num);
|
} //else fprintf(stderr,"skip pricefeed[%d]\n",num);
|
||||||
}
|
}
|
||||||
|
|
||||||
void komodo_eventadd_opreturn(struct hush_state *sp,char *symbol,int32_t height,uint256 txid,uint64_t value,uint16_t vout,uint8_t *buf,uint16_t opretlen)
|
void hush_eventadd_opreturn(struct hush_state *sp,char *symbol,int32_t height,uint256 txid,uint64_t value,uint16_t vout,uint8_t *buf,uint16_t opretlen)
|
||||||
{
|
{
|
||||||
struct komodo_event_opreturn O; uint8_t *opret;
|
struct hush_event_opreturn O; uint8_t *opret;
|
||||||
if ( SMART_CHAIN_SYMBOL[0] != 0 )
|
if ( SMART_CHAIN_SYMBOL[0] != 0 )
|
||||||
{
|
{
|
||||||
opret = (uint8_t *)calloc(1,sizeof(O) + opretlen + 16);
|
opret = (uint8_t *)calloc(1,sizeof(O) + opretlen + 16);
|
||||||
@@ -104,35 +104,35 @@ void komodo_eventadd_opreturn(struct hush_state *sp,char *symbol,int32_t height,
|
|||||||
memcpy(opret,&O,sizeof(O));
|
memcpy(opret,&O,sizeof(O));
|
||||||
memcpy(&opret[sizeof(O)],buf,opretlen);
|
memcpy(&opret[sizeof(O)],buf,opretlen);
|
||||||
O.oplen = (int32_t)(opretlen + sizeof(O));
|
O.oplen = (int32_t)(opretlen + sizeof(O));
|
||||||
komodo_eventadd(sp,height,symbol,KOMODO_EVENT_OPRETURN,opret,O.oplen);
|
hush_eventadd(sp,height,symbol,HUSH_EVENT_OPRETURN,opret,O.oplen);
|
||||||
free(opret);
|
free(opret);
|
||||||
if ( sp != 0 )
|
if ( sp != 0 )
|
||||||
komodo_opreturn(height,value,buf,opretlen,txid,vout,symbol);
|
komodo_opreturn(height,value,buf,opretlen,txid,vout,symbol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void komodo_event_undo(struct hush_state *sp,struct komodo_event *ep)
|
void hush_event_undo(struct hush_state *sp,struct hush_event *ep)
|
||||||
{
|
{
|
||||||
switch ( ep->type )
|
switch ( ep->type )
|
||||||
{
|
{
|
||||||
case KOMODO_EVENT_RATIFY: printf("rewind of ratify, needs to be coded.%d\n",ep->height); break;
|
case HUSH_EVENT_RATIFY: printf("rewind of ratify, needs to be coded.%d\n",ep->height); break;
|
||||||
case KOMODO_EVENT_NOTARIZED: break;
|
case HUSH_EVENT_NOTARIZED: break;
|
||||||
case KOMODO_EVENT_KMDHEIGHT:
|
case HUSH_EVENT_KMDHEIGHT:
|
||||||
if ( ep->height <= sp->SAVEDHEIGHT )
|
if ( ep->height <= sp->SAVEDHEIGHT )
|
||||||
sp->SAVEDHEIGHT = ep->height;
|
sp->SAVEDHEIGHT = ep->height;
|
||||||
break;
|
break;
|
||||||
case KOMODO_EVENT_PRICEFEED:
|
case HUSH_EVENT_PRICEFEED:
|
||||||
// backtrack prices;
|
// backtrack prices;
|
||||||
break;
|
break;
|
||||||
case KOMODO_EVENT_OPRETURN:
|
case HUSH_EVENT_OPRETURN:
|
||||||
// backtrack opreturns
|
// backtrack opreturns
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void komodo_event_rewind(struct hush_state *sp,char *symbol,int32_t height)
|
void hush_event_rewind(struct hush_state *sp,char *symbol,int32_t height)
|
||||||
{
|
{
|
||||||
struct komodo_event *ep;
|
struct hush_event *ep;
|
||||||
if ( sp != 0 )
|
if ( sp != 0 )
|
||||||
{
|
{
|
||||||
if ( SMART_CHAIN_SYMBOL[0] == 0 && height <= KOMODO_LASTMINED && prevKOMODO_LASTMINED != 0 )
|
if ( SMART_CHAIN_SYMBOL[0] == 0 && height <= KOMODO_LASTMINED && prevKOMODO_LASTMINED != 0 )
|
||||||
@@ -141,14 +141,14 @@ void komodo_event_rewind(struct hush_state *sp,char *symbol,int32_t height)
|
|||||||
KOMODO_LASTMINED = prevKOMODO_LASTMINED;
|
KOMODO_LASTMINED = prevKOMODO_LASTMINED;
|
||||||
prevKOMODO_LASTMINED = 0;
|
prevKOMODO_LASTMINED = 0;
|
||||||
}
|
}
|
||||||
while ( sp->Komodo_events != 0 && sp->Komodo_numevents > 0 )
|
while ( sp->Hush_events != 0 && sp->Komodo_numevents > 0 )
|
||||||
{
|
{
|
||||||
if ( (ep= sp->Komodo_events[sp->Komodo_numevents-1]) != 0 )
|
if ( (ep= sp->Hush_events[sp->Komodo_numevents-1]) != 0 )
|
||||||
{
|
{
|
||||||
if ( ep->height < height )
|
if ( ep->height < height )
|
||||||
break;
|
break;
|
||||||
//printf("[%s] undo %s event.%c ht.%d for rewind.%d\n",SMART_CHAIN_SYMBOL,symbol,ep->type,ep->height,height);
|
//printf("[%s] undo %s event.%c ht.%d for rewind.%d\n",SMART_CHAIN_SYMBOL,symbol,ep->type,ep->height,height);
|
||||||
komodo_event_undo(sp,ep);
|
hush_event_undo(sp,ep);
|
||||||
sp->Komodo_numevents--;
|
sp->Komodo_numevents--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,21 +169,21 @@ void komodo_setkmdheight(struct hush_state *sp,int32_t kmdheight,uint32_t timest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void komodo_eventadd_kmdheight(struct hush_state *sp,char *symbol,int32_t height,int32_t kmdheight,uint32_t timestamp)
|
void hush_eventadd_kmdheight(struct hush_state *sp,char *symbol,int32_t height,int32_t kmdheight,uint32_t timestamp)
|
||||||
{
|
{
|
||||||
uint32_t buf[2];
|
uint32_t buf[2];
|
||||||
if ( kmdheight > 0 ) {
|
if ( kmdheight > 0 ) {
|
||||||
buf[0] = (uint32_t)kmdheight;
|
buf[0] = (uint32_t)kmdheight;
|
||||||
buf[1] = timestamp;
|
buf[1] = timestamp;
|
||||||
komodo_eventadd(sp,height,symbol,KOMODO_EVENT_KMDHEIGHT,(uint8_t *)buf,sizeof(buf));
|
hush_eventadd(sp,height,symbol,HUSH_EVENT_KMDHEIGHT,(uint8_t *)buf,sizeof(buf));
|
||||||
if ( sp != 0 )
|
if ( sp != 0 )
|
||||||
komodo_setkmdheight(sp,kmdheight,timestamp);
|
komodo_setkmdheight(sp,kmdheight,timestamp);
|
||||||
} else {
|
} else {
|
||||||
//fprintf(stderr,"REWIND kmdheight.%d\n",kmdheight);
|
//fprintf(stderr,"REWIND kmdheight.%d\n",kmdheight);
|
||||||
kmdheight = -kmdheight;
|
kmdheight = -kmdheight;
|
||||||
komodo_eventadd(sp,height,symbol,KOMODO_EVENT_REWIND,(uint8_t *)&height,sizeof(height));
|
hush_eventadd(sp,height,symbol,HUSH_EVENT_REWIND,(uint8_t *)&height,sizeof(height));
|
||||||
if ( sp != 0 )
|
if ( sp != 0 )
|
||||||
komodo_event_rewind(sp,symbol,height);
|
hush_event_rewind(sp,symbol,height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -778,7 +778,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
|
|||||||
else if ( block.nBits == HUSH_MINDIFF_NBITS && total > 0 ) // to deal with fee stealing
|
else if ( block.nBits == HUSH_MINDIFF_NBITS && total > 0 ) // to deal with fee stealing
|
||||||
{
|
{
|
||||||
fprintf(stderr,"notary mined ht.%d with extra %.8f\n",height,dstr(total));
|
fprintf(stderr,"notary mined ht.%d with extra %.8f\n",height,dstr(total));
|
||||||
if ( height > KOMODO_NOTARIES_HEIGHT1 )
|
if ( height > HUSH_NOTARIES_HEIGHT1 )
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
if ( strangeout != 0 || notmatched != 0 )
|
if ( strangeout != 0 || notmatched != 0 )
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ int COINBASE_MATURITY = _COINBASE_MATURITY;//100;
|
|||||||
unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+10;
|
unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+10;
|
||||||
uint256 HUSH_EARLYTXID;
|
uint256 HUSH_EARLYTXID;
|
||||||
|
|
||||||
int32_t HUSH_MININGTHREADS = -1,IS_HUSH_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,HUSH_EXTERNAL_NOTARIES,HUSH_PASSPORT_INITDONE,KOMODO_PAX,HUSH_EXCHANGEWALLET,HUSH_REWIND,HUSH_CONNECTING = -1,KOMODO_DEALERNODE,HUSH_EXTRASATOSHI,ASSETCHAINS_FOUNDERS,ASSETCHAINS_CBMATURITY,HUSH_NSPV;
|
int32_t HUSH_MININGTHREADS = -1,IS_HUSH_NOTARY,USE_EXTERNAL_PUBKEY,HUSH_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,HUSH_EXTERNAL_NOTARIES,HUSH_PASSPORT_INITDONE,KOMODO_PAX,HUSH_EXCHANGEWALLET,HUSH_REWIND,HUSH_CONNECTING = -1,KOMODO_DEALERNODE,HUSH_EXTRASATOSHI,ASSETCHAINS_FOUNDERS,ASSETCHAINS_CBMATURITY,HUSH_NSPV;
|
||||||
int32_t HUSH_INSYNC,KOMODO_LASTMINED,prevKOMODO_LASTMINED,HUSH_CCACTIVATE,JUMBLR_PAUSE = 1;
|
int32_t HUSH_INSYNC,KOMODO_LASTMINED,prevKOMODO_LASTMINED,HUSH_CCACTIVATE,JUMBLR_PAUSE = 1;
|
||||||
std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_OVERRIDE_PUBKEY,DONATION_PUBKEY,ASSETCHAINS_SCRIPTPUB,NOTARY_ADDRESS,ASSETCHAINS_SELFIMPORT,ASSETCHAINS_CCLIB;
|
std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_OVERRIDE_PUBKEY,DONATION_PUBKEY,ASSETCHAINS_SCRIPTPUB,NOTARY_ADDRESS,ASSETCHAINS_SELFIMPORT,ASSETCHAINS_CCLIB;
|
||||||
uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEYHASH[20],ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE,ASSETCHAINS_TXPOW,ASSETCHAINS_MARMARA;
|
uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEYHASH[20],ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE,ASSETCHAINS_TXPOW,ASSETCHAINS_MARMARA;
|
||||||
@@ -92,7 +92,6 @@ uint32_t ASSETCHAINS_MINDIFF[] = {537857807};
|
|||||||
int32_t ASSETCHAINS_LWMAPOS = 0; // percentage of blocks should be PoS
|
int32_t ASSETCHAINS_LWMAPOS = 0; // percentage of blocks should be PoS
|
||||||
int32_t ASSETCHAINS_SAPLING = -1;
|
int32_t ASSETCHAINS_SAPLING = -1;
|
||||||
int32_t ASSETCHAINS_OVERWINTER = -1;
|
int32_t ASSETCHAINS_OVERWINTER = -1;
|
||||||
uint64_t KOMODO_INTERESTSUM,KOMODO_WALLETBALANCE;
|
|
||||||
int32_t ASSETCHAINS_STAKED;
|
int32_t ASSETCHAINS_STAKED;
|
||||||
uint64_t ASSETCHAINS_COMMISSION,ASSETCHAINS_SUPPLY = 10,ASSETCHAINS_FOUNDERS_REWARD;
|
uint64_t ASSETCHAINS_COMMISSION,ASSETCHAINS_SUPPLY = 10,ASSETCHAINS_FOUNDERS_REWARD;
|
||||||
uint32_t HUSH_INITDONE;
|
uint32_t HUSH_INITDONE;
|
||||||
@@ -266,13 +265,13 @@ uint64_t hush_current_supply(uint32_t nHeight)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( KOMODO_BIT63SET(cur_money) != 0 )
|
if ( KOMODO_BIT63SET(cur_money) != 0 )
|
||||||
return(KOMODO_MAXNVALUE);
|
return(HUSH_MAXNVALUE);
|
||||||
if ( ASSETCHAINS_COMMISSION != 0 ) {
|
if ( ASSETCHAINS_COMMISSION != 0 ) {
|
||||||
uint64_t newval = (cur_money + (cur_money/COIN * ASSETCHAINS_COMMISSION));
|
uint64_t newval = (cur_money + (cur_money/COIN * ASSETCHAINS_COMMISSION));
|
||||||
if ( KOMODO_BIT63SET(newval) != 0 )
|
if ( KOMODO_BIT63SET(newval) != 0 )
|
||||||
return(KOMODO_MAXNVALUE);
|
return(HUSH_MAXNVALUE);
|
||||||
else if ( newval < cur_money ) // check for underflow
|
else if ( newval < cur_money ) // check for underflow
|
||||||
return(KOMODO_MAXNVALUE);
|
return(HUSH_MAXNVALUE);
|
||||||
return(newval);
|
return(newval);
|
||||||
}
|
}
|
||||||
//fprintf(stderr,"cur_money %.8f\n",(double)cur_money/COIN);
|
//fprintf(stderr,"cur_money %.8f\n",(double)cur_money/COIN);
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ bool NSPV_SignTx(CMutableTransaction &mtx,int32_t vini,int64_t utxovalue,const C
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
keystore.AddKey(NSPV_key);
|
keystore.AddKey(NSPV_key);
|
||||||
if ( nTime != 0 && nTime < KOMODO_SAPLING_ACTIVATION )
|
if ( nTime != 0 && nTime < HUSH_SAPING_ACTIVATION )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"use legacy sig validation\n");
|
fprintf(stderr,"use legacy sig validation\n");
|
||||||
branchid = 0;
|
branchid = 0;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include "hush_cJSON.h"
|
#include "hush_cJSON.h"
|
||||||
|
|
||||||
#define KOMODO_MAINNET_START 178999
|
#define KOMODO_MAINNET_START 178999
|
||||||
#define KOMODO_NOTARIES_HEIGHT1 814000
|
#define HUSH_NOTARIES_HEIGHT1 814000
|
||||||
|
|
||||||
const char *Notaries_genesis[][2] =
|
const char *Notaries_genesis[][2] =
|
||||||
{
|
{
|
||||||
@@ -206,7 +206,7 @@ int32_t hush_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33,ui
|
|||||||
printf("hush_chosennotary ht.%d illegal\n",height);
|
printf("hush_chosennotary ht.%d illegal\n",height);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
if ( height >= KOMODO_NOTARIES_HARDCODED || SMART_CHAIN_SYMBOL[0] != 0 )
|
if ( height >= HUSH_NOTARIES_HARDCODED || SMART_CHAIN_SYMBOL[0] != 0 )
|
||||||
{
|
{
|
||||||
if ( (*notaryidp= komodo_electednotary(&numnotaries,pubkey33,height,timestamp)) >= 0 && numnotaries != 0 )
|
if ( (*notaryidp= komodo_electednotary(&numnotaries,pubkey33,height,timestamp)) >= 0 && numnotaries != 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,22 +25,22 @@
|
|||||||
#define PACKED __attribute__((packed))
|
#define PACKED __attribute__((packed))
|
||||||
#endif*/
|
#endif*/
|
||||||
|
|
||||||
#ifndef KOMODO_STRUCTS_H
|
#ifndef HUSH_STRUCTS_H
|
||||||
#define KOMODO_STRUCTS_H
|
#define HUSH_STRUCTS_H
|
||||||
#define GENESIS_NBITS 0x1f00ffff
|
#define GENESIS_NBITS 0x1f00ffff
|
||||||
#define KOMODO_MINRATIFY ((height < 90000) ? 7 : 11)
|
#define KOMODO_MINRATIFY ((height < 90000) ? 7 : 11)
|
||||||
#define KOMODO_NOTARIES_HARDCODED 180000 // DONT CHANGE
|
#define HUSH_NOTARIES_HARDCODED 180000 // DONT CHANGE
|
||||||
#define HUSH_MAXBLOCKS 250000 // DONT CHANGE
|
#define HUSH_MAXBLOCKS 250000 // DONT CHANGE
|
||||||
#define KOMODO_EVENT_RATIFY 'P'
|
#define HUSH_EVENT_RATIFY 'P'
|
||||||
#define KOMODO_EVENT_NOTARIZED 'N'
|
#define HUSH_EVENT_NOTARIZED 'N'
|
||||||
#define KOMODO_EVENT_KMDHEIGHT 'K'
|
#define HUSH_EVENT_KMDHEIGHT 'K'
|
||||||
#define KOMODO_EVENT_REWIND 'B'
|
#define HUSH_EVENT_REWIND 'B'
|
||||||
#define KOMODO_EVENT_PRICEFEED 'V'
|
#define HUSH_EVENT_PRICEFEED 'V'
|
||||||
#define KOMODO_EVENT_OPRETURN 'R'
|
#define HUSH_EVENT_OPRETURN 'R'
|
||||||
#define KOMODO_OPRETURN_DEPOSIT 'D'
|
#define HUSH_OPRETURN_DEPOSIT 'D'
|
||||||
#define KOMODO_OPRETURN_ISSUED 'I' // assetchain
|
#define HUSH_OPRETURN_ISSUED 'I' // assetchain
|
||||||
#define KOMODO_OPRETURN_WITHDRAW 'W' // assetchain
|
#define HUSH_OPRETURN_WITHDRAW 'W' // assetchain
|
||||||
#define KOMODO_OPRETURN_REDEEMED 'X'
|
#define HUSH_OPRETURN_REDEEMED 'X'
|
||||||
|
|
||||||
#define HUSH_KVPROTECTED 1
|
#define HUSH_KVPROTECTED 1
|
||||||
#define HUSH_KVBINARY 2
|
#define HUSH_KVBINARY 2
|
||||||
@@ -58,14 +58,14 @@ typedef union _bits320 bits320;
|
|||||||
|
|
||||||
struct komodo_kv { UT_hash_handle hh; bits256 pubkey; uint8_t *key,*value; int32_t height; uint32_t flags; uint16_t keylen,valuesize; };
|
struct komodo_kv { UT_hash_handle hh; bits256 pubkey; uint8_t *key,*value; int32_t height; uint32_t flags; uint16_t keylen,valuesize; };
|
||||||
|
|
||||||
struct komodo_event_notarized { uint256 blockhash,desttxid,MoM; int32_t notarizedheight,MoMdepth; char dest[16]; };
|
struct hush_event_notarized { uint256 blockhash,desttxid,MoM; int32_t notarizedheight,MoMdepth; char dest[16]; };
|
||||||
struct komodo_event_pubkeys { uint8_t num; uint8_t pubkeys[64][33]; };
|
struct hush_event_pubkeys { uint8_t num; uint8_t pubkeys[64][33]; };
|
||||||
struct komodo_event_opreturn { uint256 txid; uint64_t value; uint16_t vout,oplen; uint8_t opret[]; };
|
struct hush_event_opreturn { uint256 txid; uint64_t value; uint16_t vout,oplen; uint8_t opret[]; };
|
||||||
struct komodo_event_pricefeed { uint8_t num; uint32_t prices[35]; };
|
struct hush_event_pricefeed { uint8_t num; uint32_t prices[35]; };
|
||||||
|
|
||||||
struct komodo_event
|
struct hush_event
|
||||||
{
|
{
|
||||||
struct komodo_event *related;
|
struct hush_event *related;
|
||||||
uint16_t len;
|
uint16_t len;
|
||||||
int32_t height;
|
int32_t height;
|
||||||
uint8_t type,reorged;
|
uint8_t type,reorged;
|
||||||
@@ -91,26 +91,26 @@ struct notarized_checkpoint
|
|||||||
int32_t nHeight,notarized_height,MoMdepth,MoMoMdepth,MoMoMoffset,kmdstarti,kmdendi;
|
int32_t nHeight,notarized_height,MoMdepth,MoMoMdepth,MoMoMoffset,kmdstarti,kmdendi;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct komodo_ccdataMoM
|
struct hush_ccdataMoM
|
||||||
{
|
{
|
||||||
uint256 MoM;
|
uint256 MoM;
|
||||||
int32_t MoMdepth,notarized_height,height,txi;
|
int32_t MoMdepth,notarized_height,height,txi;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct komodo_ccdata_entry { uint256 MoM; int32_t notarized_height,kmdheight,txi; char symbol[65]; };
|
struct hush_ccdata_entry { uint256 MoM; int32_t notarized_height,kmdheight,txi; char symbol[65]; };
|
||||||
struct komodo_ccdatapair { int32_t notarized_height,MoMoMoffset; };
|
struct hush_ccdatapair { int32_t notarized_height,MoMoMoffset; };
|
||||||
|
|
||||||
struct komodo_ccdataMoMoM
|
struct hush_ccdataMoMoM
|
||||||
{
|
{
|
||||||
uint256 MoMoM;
|
uint256 MoMoM;
|
||||||
int32_t kmdstarti,kmdendi,MoMoMoffset,MoMoMdepth,numpairs,len;
|
int32_t kmdstarti,kmdendi,MoMoMoffset,MoMoMdepth,numpairs,len;
|
||||||
struct komodo_ccdatapair *pairs;
|
struct hush_ccdatapair *pairs;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct komodo_ccdata
|
struct hush_ccdata
|
||||||
{
|
{
|
||||||
struct komodo_ccdata *next,*prev;
|
struct hush_ccdata *next,*prev;
|
||||||
struct komodo_ccdataMoM MoMdata;
|
struct hush_ccdataMoM MoMdata;
|
||||||
uint32_t CCid,len;
|
uint32_t CCid,len;
|
||||||
char symbol[65];
|
char symbol[65];
|
||||||
};
|
};
|
||||||
@@ -122,8 +122,8 @@ struct hush_state
|
|||||||
uint32_t SAVEDTIMESTAMP;
|
uint32_t SAVEDTIMESTAMP;
|
||||||
uint64_t deposited,issued,withdrawn,approved,redeemed,shorted;
|
uint64_t deposited,issued,withdrawn,approved,redeemed,shorted;
|
||||||
struct notarized_checkpoint *NPOINTS; int32_t NUM_NPOINTS,last_NPOINTSi;
|
struct notarized_checkpoint *NPOINTS; int32_t NUM_NPOINTS,last_NPOINTSi;
|
||||||
struct komodo_event **Komodo_events; int32_t Komodo_numevents;
|
struct hush_event **Hush_events; int32_t Komodo_numevents;
|
||||||
uint32_t RTbufs[64][3]; uint64_t RTmask;
|
uint32_t RTbufs[64][3]; uint64_t RTmask;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* KOMODO_STRUCTS_H */
|
#endif /* HUSH_STRUCT_H */
|
||||||
|
|||||||
@@ -2317,7 +2317,7 @@ void hush_args(char *argv0)
|
|||||||
if ( ASSETCHAINS_CC >= HUSH_FIRSTFUNGIBLEID && MAX_MONEY < 1000000LL*SATOSHIDEN )
|
if ( ASSETCHAINS_CC >= HUSH_FIRSTFUNGIBLEID && MAX_MONEY < 1000000LL*SATOSHIDEN )
|
||||||
MAX_MONEY = 1000000LL*SATOSHIDEN;
|
MAX_MONEY = 1000000LL*SATOSHIDEN;
|
||||||
if ( KOMODO_BIT63SET(MAX_MONEY) != 0 )
|
if ( KOMODO_BIT63SET(MAX_MONEY) != 0 )
|
||||||
MAX_MONEY = KOMODO_MAXNVALUE;
|
MAX_MONEY = HUSH_MAXNVALUE;
|
||||||
if(fDebug)
|
if(fDebug)
|
||||||
fprintf(stderr,"MAX_MONEY %llu %.8f\n",(long long)MAX_MONEY,(double)MAX_MONEY/SATOSHIDEN);
|
fprintf(stderr,"MAX_MONEY %llu %.8f\n",(long long)MAX_MONEY,(double)MAX_MONEY/SATOSHIDEN);
|
||||||
//printf("baseid.%d MAX_MONEY.%s %.8f\n",baseid,SMART_CHAIN_SYMBOL,(double)MAX_MONEY/SATOSHIDEN);
|
//printf("baseid.%d MAX_MONEY.%s %.8f\n",baseid,SMART_CHAIN_SYMBOL,(double)MAX_MONEY/SATOSHIDEN);
|
||||||
|
|||||||
16
src/main.cpp
16
src/main.cpp
@@ -3484,7 +3484,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|||||||
}
|
}
|
||||||
if ( block.vtx[0].GetValueOut() > blockReward+HUSH_EXTRASATOSHI )
|
if ( block.vtx[0].GetValueOut() > blockReward+HUSH_EXTRASATOSHI )
|
||||||
{
|
{
|
||||||
if ( SMART_CHAIN_SYMBOL[0] != 0 || pindex->GetHeight() >= KOMODO_NOTARIES_HEIGHT1 || block.vtx[0].vout[0].nValue > blockReward )
|
if ( SMART_CHAIN_SYMBOL[0] != 0 || pindex->GetHeight() >= HUSH_NOTARIES_HEIGHT1 || block.vtx[0].vout[0].nValue > blockReward )
|
||||||
{
|
{
|
||||||
//fprintf(stderr, "coinbase pays too much\n");
|
//fprintf(stderr, "coinbase pays too much\n");
|
||||||
//sleepflag = true;
|
//sleepflag = true;
|
||||||
@@ -3851,7 +3851,7 @@ int32_t komodo_activate_sapling(CBlockIndex *pindex)
|
|||||||
}
|
}
|
||||||
height = pindex->GetHeight();
|
height = pindex->GetHeight();
|
||||||
blocktime = (uint32_t)pindex->nTime;
|
blocktime = (uint32_t)pindex->nTime;
|
||||||
//fprintf(stderr,"komodo_activate_sapling.%d starting blocktime %u cmp.%d\n",height,blocktime,blocktime > KOMODO_SAPLING_ACTIVATION);
|
//fprintf(stderr,"komodo_activate_sapling.%d starting blocktime %u cmp.%d\n",height,blocktime,blocktime > HUSH_SAPING_ACTIVATION);
|
||||||
|
|
||||||
// avoid trying unless we have at least 30 blocks
|
// avoid trying unless we have at least 30 blocks
|
||||||
if (height < 30)
|
if (height < 30)
|
||||||
@@ -3870,25 +3870,25 @@ int32_t komodo_activate_sapling(CBlockIndex *pindex)
|
|||||||
}
|
}
|
||||||
height = pindex->GetHeight();
|
height = pindex->GetHeight();
|
||||||
blocktime = (uint32_t)pindex->nTime;
|
blocktime = (uint32_t)pindex->nTime;
|
||||||
//fprintf(stderr,"starting blocktime %u cmp.%d\n",blocktime,blocktime > KOMODO_SAPLING_ACTIVATION);
|
//fprintf(stderr,"starting blocktime %u cmp.%d\n",blocktime,blocktime > HUSH_SAPING_ACTIVATION);
|
||||||
if ( blocktime > KOMODO_SAPLING_ACTIVATION ) // find the earliest transition
|
if ( blocktime > HUSH_SAPING_ACTIVATION ) // find the earliest transition
|
||||||
{
|
{
|
||||||
while ( (prev= pindex->pprev) != 0 )
|
while ( (prev= pindex->pprev) != 0 )
|
||||||
{
|
{
|
||||||
prevht = prev->GetHeight();
|
prevht = prev->GetHeight();
|
||||||
prevtime = (uint32_t)prev->nTime;
|
prevtime = (uint32_t)prev->nTime;
|
||||||
//fprintf(stderr,"(%d, %u).%d -> (%d, %u).%d\n",prevht,prevtime,prevtime > KOMODO_SAPLING_ACTIVATION,height,blocktime,blocktime > KOMODO_SAPLING_ACTIVATION);
|
//fprintf(stderr,"(%d, %u).%d -> (%d, %u).%d\n",prevht,prevtime,prevtime > HUSH_SAPING_ACTIVATION,height,blocktime,blocktime > HUSH_SAPING_ACTIVATION);
|
||||||
if ( prevht+1 != height )
|
if ( prevht+1 != height )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"komodo_activate_sapling: unexpected non-contiguous ht %d vs %d\n",prevht,height);
|
fprintf(stderr,"komodo_activate_sapling: unexpected non-contiguous ht %d vs %d\n",prevht,height);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
if ( prevtime <= KOMODO_SAPLING_ACTIVATION && blocktime > KOMODO_SAPLING_ACTIVATION )
|
if ( prevtime <= HUSH_SAPING_ACTIVATION && blocktime > HUSH_SAPING_ACTIVATION )
|
||||||
{
|
{
|
||||||
activation = height + 60;
|
activation = height + 60;
|
||||||
fprintf(stderr,"%s transition at %d (%d, %u) -> (%d, %u)\n",SMART_CHAIN_SYMBOL,height,prevht,prevtime,height,blocktime);
|
fprintf(stderr,"%s transition at %d (%d, %u) -> (%d, %u)\n",SMART_CHAIN_SYMBOL,height,prevht,prevtime,height,blocktime);
|
||||||
}
|
}
|
||||||
if ( prevtime < KOMODO_SAPLING_ACTIVATION-3600*24 )
|
if ( prevtime < HUSH_SAPING_ACTIVATION-3600*24 )
|
||||||
break;
|
break;
|
||||||
pindex = prev;
|
pindex = prev;
|
||||||
height = prevht;
|
height = prevht;
|
||||||
@@ -4007,7 +4007,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
|
|||||||
//fprintf(stderr,"%s: HUSH_NSPV_FULLNODE\n", __FUNCTION__);
|
//fprintf(stderr,"%s: HUSH_NSPV_FULLNODE\n", __FUNCTION__);
|
||||||
if ( ASSETCHAINS_CBOPRET != 0 )
|
if ( ASSETCHAINS_CBOPRET != 0 )
|
||||||
komodo_pricesupdate(pindexNew->GetHeight(),pblock);
|
komodo_pricesupdate(pindexNew->GetHeight(),pblock);
|
||||||
if ( ASSETCHAINS_SAPLING <= 0 && pindexNew->nTime > KOMODO_SAPLING_ACTIVATION - 24*3600 )
|
if ( ASSETCHAINS_SAPLING <= 0 && pindexNew->nTime > HUSH_SAPING_ACTIVATION - 24*3600 )
|
||||||
komodo_activate_sapling(pindexNew);
|
komodo_activate_sapling(pindexNew);
|
||||||
if ( ASSETCHAINS_CC != 0 && HUSH_SNAPSHOT_INTERVAL != 0 && (pindexNew->GetHeight() % HUSH_SNAPSHOT_INTERVAL) == 0 && pindexNew->GetHeight() >= HUSH_SNAPSHOT_INTERVAL )
|
if ( ASSETCHAINS_CC != 0 && HUSH_SNAPSHOT_INTERVAL != 0 && (pindexNew->GetHeight() % HUSH_SNAPSHOT_INTERVAL) == 0 && pindexNew->GetHeight() >= HUSH_SNAPSHOT_INTERVAL )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1107,8 +1107,7 @@ void static BitcoinMiner()
|
|||||||
fprintf(stderr,"try %s Mining with %s\n",SMART_CHAIN_SYMBOL,solver.c_str());
|
fprintf(stderr,"try %s Mining with %s\n",SMART_CHAIN_SYMBOL,solver.c_str());
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (chainparams.MiningRequiresPeers()) //chainActive.LastTip()->GetHeight() != 235300 &&
|
if (chainparams.MiningRequiresPeers()) {
|
||||||
{
|
|
||||||
//if ( ASSETCHAINS_SEED != 0 && chainActive.LastTip()->GetHeight() < 100 )
|
//if ( ASSETCHAINS_SEED != 0 && chainActive.LastTip()->GetHeight() < 100 )
|
||||||
// break;
|
// break;
|
||||||
// Busy-wait for the network to come online so we don't waste time mining
|
// Busy-wait for the network to come online so we don't waste time mining
|
||||||
@@ -1196,9 +1195,8 @@ void static BitcoinMiner()
|
|||||||
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
|
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
|
||||||
//fprintf(stderr,"Running HushMiner.%s with %u transactions in block\n",solver.c_str(),(int32_t)pblock->vtx.size());
|
//fprintf(stderr,"Running HushMiner.%s with %u transactions in block\n",solver.c_str(),(int32_t)pblock->vtx.size());
|
||||||
LogPrintf("Running HushMiner.%s with %u transactions in block (%u bytes)\n",solver.c_str(),pblock->vtx.size(),::GetSerializeSize(*pblock,SER_NETWORK,PROTOCOL_VERSION));
|
LogPrintf("Running HushMiner.%s with %u transactions in block (%u bytes)\n",solver.c_str(),pblock->vtx.size(),::GetSerializeSize(*pblock,SER_NETWORK,PROTOCOL_VERSION));
|
||||||
//
|
|
||||||
// Search
|
// Search
|
||||||
//
|
|
||||||
uint8_t pubkeys[66][33]; arith_uint256 bnMaxPoSdiff; uint32_t blocktimes[66]; int mids[256],nonzpkeys,i,j,externalflag; uint32_t savebits; int64_t nStart = GetTime();
|
uint8_t pubkeys[66][33]; arith_uint256 bnMaxPoSdiff; uint32_t blocktimes[66]; int mids[256],nonzpkeys,i,j,externalflag; uint32_t savebits; int64_t nStart = GetTime();
|
||||||
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, Params().GetConsensus());
|
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, Params().GetConsensus());
|
||||||
savebits = pblock->nBits;
|
savebits = pblock->nBits;
|
||||||
@@ -1260,14 +1258,6 @@ void static BitcoinMiner()
|
|||||||
} else Mining_start = 0;
|
} else Mining_start = 0;
|
||||||
} else Mining_start = 0;
|
} else Mining_start = 0;
|
||||||
|
|
||||||
if ( ASSETCHAINS_STAKED > 0 )
|
|
||||||
{
|
|
||||||
int32_t percPoS,z; bool fNegative,fOverflow;
|
|
||||||
HASHTarget_POW = komodo_PoWtarget(&percPoS,HASHTarget,Mining_height,ASSETCHAINS_STAKED);
|
|
||||||
HASHTarget.SetCompact(HUSH_MINDIFF_NBITS,&fNegative,&fOverflow);
|
|
||||||
if ( ASSETCHAINS_STAKED < 100 )
|
|
||||||
LogPrintf("Block %d : PoS %d%% vs target %d%% \n",Mining_height,percPoS,(int32_t)ASSETCHAINS_STAKED);
|
|
||||||
}
|
|
||||||
//else if ( ASSETCHAINS_ADAPTIVEPOW > 0 )
|
//else if ( ASSETCHAINS_ADAPTIVEPOW > 0 )
|
||||||
// HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
// HASHTarget_POW = komodo_adaptivepow_target(Mining_height,HASHTarget,pblock->nTime);
|
||||||
gotinvalid = 0;
|
gotinvalid = 0;
|
||||||
@@ -1278,7 +1268,7 @@ void static BitcoinMiner()
|
|||||||
break;
|
break;
|
||||||
hush_longestchain();
|
hush_longestchain();
|
||||||
// Hash state
|
// Hash state
|
||||||
KOMODO_CHOSEN_ONE = 0;
|
HUSH_CHOSEN_ONE = 0;
|
||||||
|
|
||||||
crypto_generichash_blake2b_state state;
|
crypto_generichash_blake2b_state state;
|
||||||
EhInitialiseState(n, k, state);
|
EhInitialiseState(n, k, state);
|
||||||
@@ -1368,7 +1358,7 @@ void static BitcoinMiner()
|
|||||||
gotinvalid = 1;
|
gotinvalid = 1;
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
KOMODO_CHOSEN_ONE = 1;
|
HUSH_CHOSEN_ONE = 1;
|
||||||
// Found a solution
|
// Found a solution
|
||||||
SetThreadPriority(THREAD_PRIORITY_NORMAL);
|
SetThreadPriority(THREAD_PRIORITY_NORMAL);
|
||||||
LogPrintf("HushMiner:\n");
|
LogPrintf("HushMiner:\n");
|
||||||
@@ -1382,7 +1372,7 @@ void static BitcoinMiner()
|
|||||||
std::lock_guard<std::mutex> lock{m_cs};
|
std::lock_guard<std::mutex> lock{m_cs};
|
||||||
cancelSolver = false;
|
cancelSolver = false;
|
||||||
}
|
}
|
||||||
KOMODO_CHOSEN_ONE = 0;
|
HUSH_CHOSEN_ONE = 0;
|
||||||
SetThreadPriority(THREAD_PRIORITY_LOWEST);
|
SetThreadPriority(THREAD_PRIORITY_LOWEST);
|
||||||
// In regression test mode, stop mining after a block is found.
|
// In regression test mode, stop mining after a block is found.
|
||||||
if (chainparams.MineBlocksOnDemand()) {
|
if (chainparams.MineBlocksOnDemand()) {
|
||||||
|
|||||||
@@ -678,7 +678,7 @@ int32_t hush_currentheight();
|
|||||||
void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height);
|
void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height);
|
||||||
bool komodo_checkopret(CBlock *pblock, CScript &merkleroot);
|
bool komodo_checkopret(CBlock *pblock, CScript &merkleroot);
|
||||||
CScript komodo_makeopret(CBlock *pblock, bool fNew);
|
CScript komodo_makeopret(CBlock *pblock, bool fNew);
|
||||||
extern int32_t KOMODO_CHOSEN_ONE;
|
extern int32_t HUSH_CHOSEN_ONE;
|
||||||
extern char SMART_CHAIN_SYMBOL[HUSH_SMART_CHAIN_MAXLEN];
|
extern char SMART_CHAIN_SYMBOL[HUSH_SMART_CHAIN_MAXLEN];
|
||||||
#define KOMODO_ELECTION_GAP 2000
|
#define KOMODO_ELECTION_GAP 2000
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ bool EnsureWalletIsAvailable(bool avoidException);
|
|||||||
|
|
||||||
|
|
||||||
int32_t hush_MoM(int32_t *notarized_htp,uint256 *MoMp,uint256 *kmdtxidp,int32_t nHeight,uint256 *MoMoMp,int32_t *MoMoMoffsetp,int32_t *MoMoMdepthp,int32_t *kmdstartip,int32_t *kmdendip);
|
int32_t hush_MoM(int32_t *notarized_htp,uint256 *MoMp,uint256 *kmdtxidp,int32_t nHeight,uint256 *MoMoMp,int32_t *MoMoMoffsetp,int32_t *MoMoMdepthp,int32_t *kmdstartip,int32_t *kmdendip);
|
||||||
int32_t hush_MoMoMdata(char *hexstr,int32_t hexsize,struct komodo_ccdataMoMoM *mdata,char *symbol,int32_t kmdheight,int32_t notarized_height);
|
int32_t hush_MoMoMdata(char *hexstr,int32_t hexsize,struct hush_ccdataMoMoM *mdata,char *symbol,int32_t kmdheight,int32_t notarized_height);
|
||||||
struct komodo_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t kmdstarti,int32_t kmdendi);
|
struct hush_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t kmdstarti,int32_t kmdendi);
|
||||||
uint256 komodo_calcMoM(int32_t height,int32_t MoMdepth);
|
uint256 komodo_calcMoM(int32_t height,int32_t MoMdepth);
|
||||||
int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp);
|
int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp);
|
||||||
extern std::string ASSETCHAINS_SELFIMPORT;
|
extern std::string ASSETCHAINS_SELFIMPORT;
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ int32_t hush_notarized_height(int32_t *prevMoMheightp,uint256 *hashp,uint256 *tx
|
|||||||
bool komodo_txnotarizedconfirmed(uint256 txid);
|
bool komodo_txnotarizedconfirmed(uint256 txid);
|
||||||
uint32_t hush_chainactive_timestamp();
|
uint32_t hush_chainactive_timestamp();
|
||||||
int32_t hush_whoami(char *pubkeystr,int32_t height,uint32_t timestamp);
|
int32_t hush_whoami(char *pubkeystr,int32_t height,uint32_t timestamp);
|
||||||
extern uint64_t KOMODO_INTERESTSUM,KOMODO_WALLETBALANCE;
|
|
||||||
extern int32_t KOMODO_LASTMINED,JUMBLR_PAUSE,HUSH_LONGESTCHAIN,IS_HUSH_NOTARY,HUSH_INSYNC;
|
extern int32_t KOMODO_LASTMINED,JUMBLR_PAUSE,HUSH_LONGESTCHAIN,IS_HUSH_NOTARY,HUSH_INSYNC;
|
||||||
extern char SMART_CHAIN_SYMBOL[HUSH_SMART_CHAIN_MAXLEN];
|
extern char SMART_CHAIN_SYMBOL[HUSH_SMART_CHAIN_MAXLEN];
|
||||||
uint32_t komodo_segid32(char *coinaddr);
|
uint32_t komodo_segid32(char *coinaddr);
|
||||||
@@ -246,15 +245,7 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
if (pwalletMain) {
|
if (pwalletMain) {
|
||||||
obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
|
obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
|
||||||
if ( SMART_CHAIN_SYMBOL[0] == 0 )
|
obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance())));
|
||||||
{
|
|
||||||
obj.push_back(Pair("interest", ValueFromAmount(KOMODO_INTERESTSUM)));
|
|
||||||
obj.push_back(Pair("balance", ValueFromAmount(KOMODO_WALLETBALANCE))); //pwalletMain->GetBalance()
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance()))); //
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//fprintf(stderr,"after wallet %u\n",(uint32_t)time(NULL));
|
//fprintf(stderr,"after wallet %u\n",(uint32_t)time(NULL));
|
||||||
@@ -1201,8 +1192,8 @@ UniValue getnotarypayinfo(const UniValue& params, bool fHelp, const CPubKey& myp
|
|||||||
balance = checkburnaddress(received, TotalNotaryPay, height, "REDVp3ox1pbcWYCzySadfHhk8UU3HM4k5x");
|
balance = checkburnaddress(received, TotalNotaryPay, height, "REDVp3ox1pbcWYCzySadfHhk8UU3HM4k5x");
|
||||||
|
|
||||||
notarycount = hush_notaries(notarypubkeys, height, chainActive[height]->GetBlockTime());
|
notarycount = hush_notaries(notarypubkeys, height, chainActive[height]->GetBlockTime());
|
||||||
NotaryPay = komodo_notarypayamount(height, notarycount)*notarycount;
|
NotaryPay = komodo_notarypayamount(height, notarycount)*notarycount;
|
||||||
bool spent = (received != balance);
|
bool spent = (received != balance);
|
||||||
if ( !spent )
|
if ( !spent )
|
||||||
{
|
{
|
||||||
notaleft = ((int64_t)balance - TotalNotaryPay) / NotaryPay;
|
notaleft = ((int64_t)balance - TotalNotaryPay) / NotaryPay;
|
||||||
|
|||||||
@@ -165,9 +165,9 @@ string AccountFromValue(const UniValue& value)
|
|||||||
return strAccount;
|
return strAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *komodo_chainname()
|
char *hush_chainname()
|
||||||
{
|
{
|
||||||
return(SMART_CHAIN_SYMBOL[0] == 0 ? (char *)"KMD" : SMART_CHAIN_SYMBOL);
|
return(SMART_CHAIN_SYMBOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OS_randombytes(unsigned char *x,long xlen);
|
void OS_randombytes(unsigned char *x,long xlen);
|
||||||
@@ -180,11 +180,11 @@ UniValue getnewaddress(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
if (fHelp || params.size() > 1)
|
if (fHelp || params.size() > 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getnewaddress ( \"account\" )\n"
|
"getnewaddress ( \"account\" )\n"
|
||||||
"\nReturns a new " + strprintf("%s",komodo_chainname()) + " address for receiving payments.\n"
|
"\nReturns a new " + strprintf("%s",hush_chainname()) + " address for receiving payments.\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"account\" (string, optional) DEPRECATED. If provided, it MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"1. \"account\" (string, optional) DEPRECATED. If provided, it MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"" + strprintf("%s",komodo_chainname()) + "_address\" (string) The new " + strprintf("%s",komodo_chainname()) + " address\n"
|
"\"" + strprintf("%s",hush_chainname()) + "_address\" (string) The new " + strprintf("%s",hush_chainname()) + " address\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("getnewaddress", "")
|
+ HelpExampleCli("getnewaddress", "")
|
||||||
+ HelpExampleRpc("getnewaddress", "")
|
+ HelpExampleRpc("getnewaddress", "")
|
||||||
@@ -274,11 +274,11 @@ UniValue getaccountaddress(const UniValue& params, bool fHelp, const CPubKey& my
|
|||||||
if (fHelp || params.size() != 1)
|
if (fHelp || params.size() != 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getaccountaddress \"account\"\n"
|
"getaccountaddress \"account\"\n"
|
||||||
"\nDEPRECATED. Returns the current " + strprintf("%s",komodo_chainname()) + " address for receiving payments to this account.\n"
|
"\nDEPRECATED. Returns the current " + strprintf("%s",hush_chainname()) + " address for receiving payments to this account.\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"" + strprintf("%s",komodo_chainname()) + "_address\" (string) The account " + strprintf("%s",komodo_chainname()) + " address\n"
|
"\"" + strprintf("%s",hush_chainname()) + "_address\" (string) The account " + strprintf("%s",hush_chainname()) + " address\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("getaccountaddress", "")
|
+ HelpExampleCli("getaccountaddress", "")
|
||||||
+ HelpExampleCli("getaccountaddress", "\"\"")
|
+ HelpExampleCli("getaccountaddress", "\"\"")
|
||||||
@@ -306,7 +306,7 @@ UniValue getrawchangeaddress(const UniValue& params, bool fHelp, const CPubKey&
|
|||||||
if (fHelp || params.size() > 1)
|
if (fHelp || params.size() > 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getrawchangeaddress\n"
|
"getrawchangeaddress\n"
|
||||||
"\nReturns a new " + strprintf("%s",komodo_chainname()) + " address, for receiving change.\n"
|
"\nReturns a new " + strprintf("%s",hush_chainname()) + " address, for receiving change.\n"
|
||||||
"This is for use with raw transactions, NOT normal use.\n"
|
"This is for use with raw transactions, NOT normal use.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"address\" (string) The address\n"
|
"\"address\" (string) The address\n"
|
||||||
@@ -340,10 +340,10 @@ UniValue setaccount(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
|
|
||||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"setaccount \"" + strprintf("%s",komodo_chainname()) + "_address\" \"account\"\n"
|
"setaccount \"" + strprintf("%s",hush_chainname()) + "_address\" \"account\"\n"
|
||||||
"\nDEPRECATED. Sets the account associated with the given address.\n"
|
"\nDEPRECATED. Sets the account associated with the given address.\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"" + strprintf("%s",komodo_chainname()) + "_address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address to be associated with an account.\n"
|
"1. \"" + strprintf("%s",hush_chainname()) + "_address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address to be associated with an account.\n"
|
||||||
"2. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"2. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("setaccount", "\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" \"tabby\"")
|
+ HelpExampleCli("setaccount", "\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" \"tabby\"")
|
||||||
@@ -386,10 +386,10 @@ UniValue getaccount(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
|
|
||||||
if (fHelp || params.size() != 1)
|
if (fHelp || params.size() != 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getaccount \"" + strprintf("%s",komodo_chainname()) + "_address\"\n"
|
"getaccount \"" + strprintf("%s",hush_chainname()) + "_address\"\n"
|
||||||
"\nDEPRECATED. Returns the account associated with the given address.\n"
|
"\nDEPRECATED. Returns the account associated with the given address.\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"" + strprintf("%s",komodo_chainname()) + "_address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address for account lookup.\n"
|
"1. \"" + strprintf("%s",hush_chainname()) + "_address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address for account lookup.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"accountname\" (string) the account address\n"
|
"\"accountname\" (string) the account address\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
@@ -426,7 +426,7 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp, const CPubKey
|
|||||||
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"[ (json array of string)\n"
|
"[ (json array of string)\n"
|
||||||
" \"" + strprintf("%s",komodo_chainname()) + "_address\" (string) a " + strprintf("%s",komodo_chainname()) + " address associated with the given account\n"
|
" \"" + strprintf("%s",hush_chainname()) + "_address\" (string) a " + strprintf("%s",hush_chainname()) + " address associated with the given account\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
"]\n"
|
"]\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
@@ -502,19 +502,19 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
|
|
||||||
if (fHelp || params.size() < 2 || params.size() > 5)
|
if (fHelp || params.size() < 2 || params.size() > 5)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"sendtoaddress \"" + strprintf("%s",komodo_chainname()) + "_address\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
|
"sendtoaddress \"" + strprintf("%s",hush_chainname()) + "_address\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
|
||||||
"\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
|
"\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
|
||||||
+ HelpRequiringPassphrase() +
|
+ HelpRequiringPassphrase() +
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"" + strprintf("%s",komodo_chainname()) + "_address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address to send to.\n"
|
"1. \"" + strprintf("%s",hush_chainname()) + "_address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address to send to.\n"
|
||||||
"2. \"amount\" (numeric, required) The amount in " + strprintf("%s",komodo_chainname()) + " to send. eg 0.1\n"
|
"2. \"amount\" (numeric, required) The amount in " + strprintf("%s",hush_chainname()) + " to send. eg 0.1\n"
|
||||||
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
||||||
" This is not part of the transaction, just kept in your wallet.\n"
|
" This is not part of the transaction, just kept in your wallet.\n"
|
||||||
"4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n"
|
"4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n"
|
||||||
" to which you're sending the transaction. This is not part of the \n"
|
" to which you're sending the transaction. This is not part of the \n"
|
||||||
" transaction, just kept in your wallet.\n"
|
" transaction, just kept in your wallet.\n"
|
||||||
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
|
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
|
||||||
" The recipient will receive less " + strprintf("%s",komodo_chainname()) + " than you enter in the amount field.\n"
|
" The recipient will receive less " + strprintf("%s",hush_chainname()) + " than you enter in the amount field.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"transactionid\" (string) The transaction id.\n"
|
"\"transactionid\" (string) The transaction id.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
@@ -528,7 +528,7 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
{
|
{
|
||||||
if ( hush_isnotaryvout((char *)params[0].get_str().c_str(),chainActive.LastTip()->nTime) == 0 )
|
if ( hush_isnotaryvout((char *)params[0].get_str().c_str(),chainActive.LastTip()->nTime) == 0 )
|
||||||
{
|
{
|
||||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid " + strprintf("%s",komodo_chainname()) + " address");
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid " + strprintf("%s",hush_chainname()) + " address");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
@@ -570,7 +570,6 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
uint64_t PAX_fiatdest(uint64_t *seedp,int32_t tokomodo,char *destaddr,uint8_t pubkey37[37],char *coinaddr,int32_t height,char *base,int64_t fiatoshis);
|
uint64_t PAX_fiatdest(uint64_t *seedp,int32_t tokomodo,char *destaddr,uint8_t pubkey37[37],char *coinaddr,int32_t height,char *base,int64_t fiatoshis);
|
||||||
int32_t komodo_opreturnscript(uint8_t *script,uint8_t type,uint8_t *opret,int32_t opretlen);
|
int32_t komodo_opreturnscript(uint8_t *script,uint8_t type,uint8_t *opret,int32_t opretlen);
|
||||||
extern int32_t KOMODO_PAX;
|
extern int32_t KOMODO_PAX;
|
||||||
extern uint64_t KOMODO_INTERESTSUM,KOMODO_WALLETBALANCE;
|
|
||||||
int32_t komodo_is_issuer();
|
int32_t komodo_is_issuer();
|
||||||
int32_t dragon_rwnum(int32_t rwflag,uint8_t *serialized,int32_t len,void *endianedp);
|
int32_t dragon_rwnum(int32_t rwflag,uint8_t *serialized,int32_t len,void *endianedp);
|
||||||
int32_t komodo_isrealtime(int32_t *kmdheightp);
|
int32_t komodo_isrealtime(int32_t *kmdheightp);
|
||||||
@@ -734,7 +733,7 @@ UniValue paxdeposit(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
throw runtime_error("paxdeposit disabled without -pax");
|
throw runtime_error("paxdeposit disabled without -pax");
|
||||||
}
|
}
|
||||||
if ( komodo_is_issuer() != 0 )
|
if ( komodo_is_issuer() != 0 )
|
||||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "paxdeposit only from KMD");
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "paxdeposit only from KYC");
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
throw runtime_error("paxdeposit needs wallet"); //return Value::null;
|
throw runtime_error("paxdeposit needs wallet"); //return Value::null;
|
||||||
if (fHelp || params.size() != 3)
|
if (fHelp || params.size() != 3)
|
||||||
@@ -821,8 +820,8 @@ UniValue listaddressgroupings(const UniValue& params, bool fHelp, const CPubKey&
|
|||||||
"[\n"
|
"[\n"
|
||||||
" [\n"
|
" [\n"
|
||||||
" [\n"
|
" [\n"
|
||||||
" \"" + strprintf("%s",komodo_chainname()) + " address\", (string) The " + strprintf("%s",komodo_chainname()) + " address\n"
|
" \"" + strprintf("%s",hush_chainname()) + " address\", (string) The " + strprintf("%s",hush_chainname()) + " address\n"
|
||||||
" amount, (numeric) The amount in " + strprintf("%s",komodo_chainname()) + "\n"
|
" amount, (numeric) The amount in " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
" \"account\" (string, optional) The account (DEPRECATED)\n"
|
" \"account\" (string, optional) The account (DEPRECATED)\n"
|
||||||
" ]\n"
|
" ]\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
@@ -923,13 +922,13 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp, const CPubKey&
|
|||||||
|
|
||||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getreceivedbyaddress \"" + strprintf("%s",komodo_chainname()) + "_address\" ( minconf )\n"
|
"getreceivedbyaddress \"" + strprintf("%s",hush_chainname()) + "_address\" ( minconf )\n"
|
||||||
"\nReturns the total amount received by the given " + strprintf("%s",komodo_chainname()) + " address in transactions with at least minconf confirmations.\n"
|
"\nReturns the total amount received by the given " + strprintf("%s",hush_chainname()) + " address in transactions with at least minconf confirmations.\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"" + strprintf("%s",komodo_chainname()) + "_address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address for transactions.\n"
|
"1. \"" + strprintf("%s",hush_chainname()) + "_address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address for transactions.\n"
|
||||||
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"amount (numeric) The total amount in " + strprintf("%s",komodo_chainname()) + " received at this address.\n"
|
"amount (numeric) The total amount in " + strprintf("%s",hush_chainname()) + " received at this address.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nThe amount from transactions with at least 1 confirmation\n"
|
"\nThe amount from transactions with at least 1 confirmation\n"
|
||||||
+ HelpExampleCli("getreceivedbyaddress", "\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\"") +
|
+ HelpExampleCli("getreceivedbyaddress", "\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\"") +
|
||||||
@@ -1000,7 +999,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp, const CPubKey&
|
|||||||
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"amount (numeric) The total amount in " + strprintf("%s",komodo_chainname()) + " received for this account.\n"
|
"amount (numeric) The total amount in " + strprintf("%s",hush_chainname()) + " received for this account.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nAmount received by the default account with at least 1 confirmation\n"
|
"\nAmount received by the default account with at least 1 confirmation\n"
|
||||||
+ HelpExampleCli("getreceivedbyaccount", "\"\"") +
|
+ HelpExampleCli("getreceivedbyaccount", "\"\"") +
|
||||||
@@ -1099,7 +1098,7 @@ UniValue cleanwallettransactions(const UniValue& params, bool fHelp, const CPubK
|
|||||||
"1. \"txid\" (string, optional) The transaction id to keep.\n"
|
"1. \"txid\" (string, optional) The transaction id to keep.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"total_transactions\" : n, (numeric) Transactions in wallet of " + strprintf("%s",komodo_chainname()) + "\n"
|
" \"total_transactions\" : n, (numeric) Transactions in wallet of " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
" \"remaining_transactions\" : n, (numeric) Transactions in wallet after clean.\n"
|
" \"remaining_transactions\" : n, (numeric) Transactions in wallet after clean.\n"
|
||||||
" \"removed_transactions\" : n, (numeric) The number of transactions removed.\n"
|
" \"removed_transactions\" : n, (numeric) The number of transactions removed.\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
@@ -1202,7 +1201,7 @@ UniValue getbalance(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||||
"3. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
|
"3. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"amount (numeric) The total amount in " + strprintf("%s",komodo_chainname()) + " received for this account.\n"
|
"amount (numeric) The total amount in " + strprintf("%s",hush_chainname()) + " received for this account.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nThe total amount in the wallet\n"
|
"\nThe total amount in the wallet\n"
|
||||||
+ HelpExampleCli("getbalance", "") +
|
+ HelpExampleCli("getbalance", "") +
|
||||||
@@ -1298,15 +1297,15 @@ UniValue movecmd(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"2. \"toaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"2. \"toaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"3. amount (numeric) Quantity of " + strprintf("%s",komodo_chainname()) + " to move between accounts.\n"
|
"3. amount (numeric) Quantity of " + strprintf("%s",hush_chainname()) + " to move between accounts.\n"
|
||||||
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
||||||
"5. \"comment\" (string, optional) An optional comment, stored in the wallet only.\n"
|
"5. \"comment\" (string, optional) An optional comment, stored in the wallet only.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"true|false (boolean) true if successful.\n"
|
"true|false (boolean) true if successful.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nMove 0.01 " + strprintf("%s",komodo_chainname()) + " from the default account to the account named tabby\n"
|
"\nMove 0.01 " + strprintf("%s",hush_chainname()) + " from the default account to the account named tabby\n"
|
||||||
+ HelpExampleCli("move", "\"\" \"tabby\" 0.01") +
|
+ HelpExampleCli("move", "\"\" \"tabby\" 0.01") +
|
||||||
"\nMove 0.01 " + strprintf("%s",komodo_chainname()) + " timotei to akiko with a comment and funds have 6 confirmations\n"
|
"\nMove 0.01 " + strprintf("%s",hush_chainname()) + " timotei to akiko with a comment and funds have 6 confirmations\n"
|
||||||
+ HelpExampleCli("move", "\"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"") +
|
+ HelpExampleCli("move", "\"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"") +
|
||||||
"\nAs a json rpc call\n"
|
"\nAs a json rpc call\n"
|
||||||
+ HelpExampleRpc("move", "\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"")
|
+ HelpExampleRpc("move", "\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"")
|
||||||
@@ -1368,14 +1367,14 @@ UniValue sendfrom(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
|
|
||||||
if (fHelp || params.size() < 3 || params.size() > 6)
|
if (fHelp || params.size() < 3 || params.size() > 6)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"sendfrom \"fromaccount\" \"to" + strprintf("%s",komodo_chainname()) + "address\" amount ( minconf \"comment\" \"comment-to\" )\n"
|
"sendfrom \"fromaccount\" \"to" + strprintf("%s",hush_chainname()) + "address\" amount ( minconf \"comment\" \"comment-to\" )\n"
|
||||||
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a " + strprintf("%s",komodo_chainname()) + " address.\n"
|
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a " + strprintf("%s",hush_chainname()) + " address.\n"
|
||||||
"The amount is a real and is rounded to the nearest 0.00000001."
|
"The amount is a real and is rounded to the nearest 0.00000001."
|
||||||
+ HelpRequiringPassphrase() + "\n"
|
+ HelpRequiringPassphrase() + "\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"2. \"to" + strprintf("%s",komodo_chainname()) + "address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address to send funds to.\n"
|
"2. \"to" + strprintf("%s",hush_chainname()) + "address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address to send funds to.\n"
|
||||||
"3. amount (numeric, required) The amount in " + strprintf("%s",komodo_chainname()) + " (transaction fee is added on top).\n"
|
"3. amount (numeric, required) The amount in " + strprintf("%s",hush_chainname()) + " (transaction fee is added on top).\n"
|
||||||
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
||||||
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
||||||
" This is not part of the transaction, just kept in your wallet.\n"
|
" This is not part of the transaction, just kept in your wallet.\n"
|
||||||
@@ -1385,7 +1384,7 @@ UniValue sendfrom(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"transactionid\" (string) The transaction id.\n"
|
"\"transactionid\" (string) The transaction id.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nSend 0.01 " + strprintf("%s",komodo_chainname()) + " from the default account to the address, must have at least 1 confirmation\n"
|
"\nSend 0.01 " + strprintf("%s",hush_chainname()) + " from the default account to the address, must have at least 1 confirmation\n"
|
||||||
+ HelpExampleCli("sendfrom", "\"\" \"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" 0.01") +
|
+ HelpExampleCli("sendfrom", "\"\" \"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" 0.01") +
|
||||||
"\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n"
|
"\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n"
|
||||||
+ HelpExampleCli("sendfrom", "\"tabby\" \"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" 0.01 6 \"donation\" \"seans outpost\"") +
|
+ HelpExampleCli("sendfrom", "\"tabby\" \"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" 0.01 6 \"donation\" \"seans outpost\"") +
|
||||||
@@ -1443,14 +1442,14 @@ UniValue sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"2. \"amounts\" (string, required) A json object with addresses and amounts\n"
|
"2. \"amounts\" (string, required) A json object with addresses and amounts\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"address\":amount (numeric) The " + strprintf("%s",komodo_chainname()) + " address is the key, the numeric amount in " + strprintf("%s",komodo_chainname()) + " is the value\n"
|
" \"address\":amount (numeric) The " + strprintf("%s",hush_chainname()) + " address is the key, the numeric amount in " + strprintf("%s",hush_chainname()) + " is the value\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
|
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
|
||||||
"4. \"comment\" (string, optional) A comment\n"
|
"4. \"comment\" (string, optional) A comment\n"
|
||||||
"5. subtractfeefromamount (string, optional) A json array with addresses.\n"
|
"5. subtractfeefromamount (string, optional) A json array with addresses.\n"
|
||||||
" The fee will be equally deducted from the amount of each selected address.\n"
|
" The fee will be equally deducted from the amount of each selected address.\n"
|
||||||
" Those recipients will receive less " + strprintf("%s",komodo_chainname()) + " than you enter in their corresponding amount field.\n"
|
" Those recipients will receive less " + strprintf("%s",hush_chainname()) + " than you enter in their corresponding amount field.\n"
|
||||||
" If no addresses are specified here, the sender pays the fee.\n"
|
" If no addresses are specified here, the sender pays the fee.\n"
|
||||||
" [\n"
|
" [\n"
|
||||||
" \"address\" (string) Subtract fee from this address\n"
|
" \"address\" (string) Subtract fee from this address\n"
|
||||||
@@ -1554,20 +1553,20 @@ UniValue addmultisigaddress(const UniValue& params, bool fHelp, const CPubKey& m
|
|||||||
{
|
{
|
||||||
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
|
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
|
||||||
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
|
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
|
||||||
"Each key is a " + strprintf("%s",komodo_chainname()) + " address or hex-encoded public key.\n"
|
"Each key is a " + strprintf("%s",hush_chainname()) + " address or hex-encoded public key.\n"
|
||||||
"If 'account' is specified (DEPRECATED), assign address to that account.\n"
|
"If 'account' is specified (DEPRECATED), assign address to that account.\n"
|
||||||
|
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
|
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
|
||||||
"2. \"keysobject\" (string, required) A json array of " + strprintf("%s",komodo_chainname()) + " addresses or hex-encoded public keys\n"
|
"2. \"keysobject\" (string, required) A json array of " + strprintf("%s",hush_chainname()) + " addresses or hex-encoded public keys\n"
|
||||||
" [\n"
|
" [\n"
|
||||||
" \"address\" (string) " + strprintf("%s",komodo_chainname()) + " address or hex-encoded public key\n"
|
" \"address\" (string) " + strprintf("%s",hush_chainname()) + " address or hex-encoded public key\n"
|
||||||
" ...,\n"
|
" ...,\n"
|
||||||
" ]\n"
|
" ]\n"
|
||||||
"3. \"account\" (string, optional) DEPRECATED. If provided, MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
"3. \"account\" (string, optional) DEPRECATED. If provided, MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
|
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"" + strprintf("%s",komodo_chainname()) + "_address\" (string) A " + strprintf("%s",komodo_chainname()) + " address associated with the keys.\n"
|
"\"" + strprintf("%s",hush_chainname()) + "_address\" (string) A " + strprintf("%s",hush_chainname()) + " address associated with the keys.\n"
|
||||||
|
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nAdd a multisig address from 2 addresses\n"
|
"\nAdd a multisig address from 2 addresses\n"
|
||||||
@@ -1760,7 +1759,7 @@ UniValue listreceivedbyaddress(const UniValue& params, bool fHelp, const CPubKey
|
|||||||
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
|
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
|
||||||
" \"address\" : \"receivingaddress\", (string) The receiving address\n"
|
" \"address\" : \"receivingaddress\", (string) The receiving address\n"
|
||||||
" \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n"
|
" \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n"
|
||||||
" \"amount\" : x.xxx, (numeric) The total amount in " + strprintf("%s",komodo_chainname()) + " received by the address\n"
|
" \"amount\" : x.xxx, (numeric) The total amount in " + strprintf("%s",hush_chainname()) + " received by the address\n"
|
||||||
" \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n"
|
" \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
@@ -1939,17 +1938,17 @@ UniValue listtransactions(const UniValue& params, bool fHelp, const CPubKey& myp
|
|||||||
" {\n"
|
" {\n"
|
||||||
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
|
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
|
||||||
" It will be \"\" for the default account.\n"
|
" It will be \"\" for the default account.\n"
|
||||||
" \"address\":\"" + strprintf("%s",komodo_chainname()) + "_address\", (string) The " + strprintf("%s",komodo_chainname()) + " address of the transaction. Not present for \n"
|
" \"address\":\"" + strprintf("%s",hush_chainname()) + "_address\", (string) The " + strprintf("%s",hush_chainname()) + " address of the transaction. Not present for \n"
|
||||||
" move transactions (category = move).\n"
|
" move transactions (category = move).\n"
|
||||||
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
|
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
|
||||||
" transaction between accounts, and not associated with an address,\n"
|
" transaction between accounts, and not associated with an address,\n"
|
||||||
" transaction id or block. 'send' and 'receive' transactions are \n"
|
" transaction id or block. 'send' and 'receive' transactions are \n"
|
||||||
" associated with an address, transaction id and block details\n"
|
" associated with an address, transaction id and block details\n"
|
||||||
" \"amount\": x.xxx, (numeric) The amount in " + strprintf("%s",komodo_chainname()) + ". This is negative for the 'send' category, and for the\n"
|
" \"amount\": x.xxx, (numeric) The amount in " + strprintf("%s",hush_chainname()) + ". This is negative for the 'send' category, and for the\n"
|
||||||
" 'move' category for moves outbound. It is positive for the 'receive' category,\n"
|
" 'move' category for moves outbound. It is positive for the 'receive' category,\n"
|
||||||
" and for the 'move' category for inbound funds.\n"
|
" and for the 'move' category for inbound funds.\n"
|
||||||
" \"vout\" : n, (numeric) the vout value\n"
|
" \"vout\" : n, (numeric) the vout value\n"
|
||||||
" \"fee\": x.xxx, (numeric) The amount of the fee in " + strprintf("%s",komodo_chainname()) + ". This is negative and only available for the \n"
|
" \"fee\": x.xxx, (numeric) The amount of the fee in " + strprintf("%s",hush_chainname()) + ". This is negative and only available for the \n"
|
||||||
" 'send' category of transactions.\n"
|
" 'send' category of transactions.\n"
|
||||||
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
|
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
|
||||||
" 'receive' category of transactions.\n"
|
" 'receive' category of transactions.\n"
|
||||||
@@ -2142,12 +2141,12 @@ UniValue listsinceblock(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"{\n"
|
"{\n"
|
||||||
" \"transactions\": [\n"
|
" \"transactions\": [\n"
|
||||||
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
|
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
|
||||||
" \"address\":\"" + strprintf("%s",komodo_chainname()) + "_address\", (string) The " + strprintf("%s",komodo_chainname()) + " address of the transaction. Not present for move transactions (category = move).\n"
|
" \"address\":\"" + strprintf("%s",hush_chainname()) + "_address\", (string) The " + strprintf("%s",hush_chainname()) + " address of the transaction. Not present for move transactions (category = move).\n"
|
||||||
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
|
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
|
||||||
" \"amount\": x.xxx, (numeric) The amount in " + strprintf("%s",komodo_chainname()) + ". This is negative for the 'send' category, and for the 'move' category for moves \n"
|
" \"amount\": x.xxx, (numeric) The amount in " + strprintf("%s",hush_chainname()) + ". This is negative for the 'send' category, and for the 'move' category for moves \n"
|
||||||
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
|
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
|
||||||
" \"vout\" : n, (numeric) the vout value\n"
|
" \"vout\" : n, (numeric) the vout value\n"
|
||||||
" \"fee\": x.xxx, (numeric) The amount of the fee in " + strprintf("%s",komodo_chainname()) + ". This is negative and only available for the 'send' category of transactions.\n"
|
" \"fee\": x.xxx, (numeric) The amount of the fee in " + strprintf("%s",hush_chainname()) + ". This is negative and only available for the 'send' category of transactions.\n"
|
||||||
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
||||||
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
||||||
" \"blockindex\": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
" \"blockindex\": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
||||||
@@ -2230,7 +2229,7 @@ UniValue gettransaction(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"2. \"includeWatchonly\" (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n"
|
"2. \"includeWatchonly\" (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"amount\" : x.xxx, (numeric) The transaction amount in " + strprintf("%s",komodo_chainname()) + "\n"
|
" \"amount\" : x.xxx, (numeric) The transaction amount in " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
" \"confirmations\" : n, (numeric) The number of confirmations\n"
|
" \"confirmations\" : n, (numeric) The number of confirmations\n"
|
||||||
" \"blockhash\" : \"hash\", (string) The block hash\n"
|
" \"blockhash\" : \"hash\", (string) The block hash\n"
|
||||||
" \"blockindex\" : xx, (numeric) The block index\n"
|
" \"blockindex\" : xx, (numeric) The block index\n"
|
||||||
@@ -2241,9 +2240,9 @@ UniValue gettransaction(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
" \"details\" : [\n"
|
" \"details\" : [\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
|
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
|
||||||
" \"address\" : \"" + strprintf("%s",komodo_chainname()) + "_address\", (string) The " + strprintf("%s",komodo_chainname()) + " address involved in the transaction\n"
|
" \"address\" : \"" + strprintf("%s",hush_chainname()) + "_address\", (string) The " + strprintf("%s",hush_chainname()) + " address involved in the transaction\n"
|
||||||
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
|
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
|
||||||
" \"amount\" : x.xxx (numeric) The amount in " + strprintf("%s",komodo_chainname()) + "\n"
|
" \"amount\" : x.xxx (numeric) The amount in " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
" \"vout\" : n, (numeric) the vout value\n"
|
" \"vout\" : n, (numeric) the vout value\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
@@ -2401,7 +2400,7 @@ UniValue walletpassphrase(const UniValue& params, bool fHelp, const CPubKey& myp
|
|||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"walletpassphrase \"passphrase\" timeout\n"
|
"walletpassphrase \"passphrase\" timeout\n"
|
||||||
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
|
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
|
||||||
"This is needed prior to performing transactions related to private keys such as sending " + strprintf("%s",komodo_chainname()) + "\n"
|
"This is needed prior to performing transactions related to private keys such as sending " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"passphrase\" (string, required) The wallet passphrase\n"
|
"1. \"passphrase\" (string, required) The wallet passphrase\n"
|
||||||
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
|
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
|
||||||
@@ -2569,10 +2568,10 @@ UniValue encryptwallet(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nEncrypt you wallet\n"
|
"\nEncrypt you wallet\n"
|
||||||
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
|
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
|
||||||
"\nNow set the passphrase to use the wallet, such as for signing or sending " + strprintf("%s",komodo_chainname()) + "\n"
|
"\nNow set the passphrase to use the wallet, such as for signing or sending " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
|
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
|
||||||
"\nNow we can so something like sign\n"
|
"\nNow we can so something like sign\n"
|
||||||
+ HelpExampleCli("signmessage", "\"" + strprintf("%s",komodo_chainname()) + "_address\" \"test message\"") +
|
+ HelpExampleCli("signmessage", "\"" + strprintf("%s",hush_chainname()) + "_address\" \"test message\"") +
|
||||||
"\nNow lock the wallet again by removing the passphrase\n"
|
"\nNow lock the wallet again by removing the passphrase\n"
|
||||||
+ HelpExampleCli("walletlock", "") +
|
+ HelpExampleCli("walletlock", "") +
|
||||||
"\nAs a json rpc call\n"
|
"\nAs a json rpc call\n"
|
||||||
@@ -2620,7 +2619,7 @@ UniValue lockunspent(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
|
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
|
||||||
"\nUpdates list of temporarily unspendable outputs.\n"
|
"\nUpdates list of temporarily unspendable outputs.\n"
|
||||||
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
|
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
|
||||||
"A locked transaction output will not be chosen by automatic coin selection, when spending " + strprintf("%s",komodo_chainname()) + ".\n"
|
"A locked transaction output will not be chosen by automatic coin selection, when spending " + strprintf("%s",hush_chainname()) + ".\n"
|
||||||
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
|
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
|
||||||
"is always cleared (by virtue of process exit) when a node stops or fails.\n"
|
"is always cleared (by virtue of process exit) when a node stops or fails.\n"
|
||||||
"Also see the listunspent call\n"
|
"Also see the listunspent call\n"
|
||||||
@@ -2753,7 +2752,7 @@ UniValue settxfee(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"settxfee amount\n"
|
"settxfee amount\n"
|
||||||
"\nSet the transaction fee per kB.\n"
|
"\nSet the transaction fee per kB.\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. amount (numeric, required) The transaction fee in " + strprintf("%s",komodo_chainname()) + "/kB rounded to the nearest 0.00000001\n"
|
"1. amount (numeric, required) The transaction fee in " + strprintf("%s",hush_chainname()) + "/kB rounded to the nearest 0.00000001\n"
|
||||||
"\nResult\n"
|
"\nResult\n"
|
||||||
"true|false (boolean) Returns true if successful\n"
|
"true|false (boolean) Returns true if successful\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
@@ -2782,9 +2781,9 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
||||||
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + strprintf("%s",komodo_chainname()) + "\n"
|
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + strprintf("%s",komodo_chainname()) + "\n"
|
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + strprintf("%s",komodo_chainname()) + "\n"
|
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + strprintf("%s",hush_chainname()) + "\n"
|
||||||
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
|
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
|
||||||
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
|
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
|
||||||
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
|
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
|
||||||
@@ -2861,9 +2860,9 @@ UniValue listunspent(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
|
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
|
||||||
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
|
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
|
||||||
"3. \"addresses\" (string) A json array of " + strprintf("%s",komodo_chainname()) + " addresses to filter\n"
|
"3. \"addresses\" (string) A json array of " + strprintf("%s",hush_chainname()) + " addresses to filter\n"
|
||||||
" [\n"
|
" [\n"
|
||||||
" \"address\" (string) " + strprintf("%s",komodo_chainname()) + " address\n"
|
" \"address\" (string) " + strprintf("%s",hush_chainname()) + " address\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" ]\n"
|
" ]\n"
|
||||||
"\nResult\n"
|
"\nResult\n"
|
||||||
@@ -3841,7 +3840,7 @@ UniValue z_getnewaddress(const UniValue& params, bool fHelp, const CPubKey& mypk
|
|||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"type\" (string, optional, default=\"" + defaultType + "\") The type of address. Either "+ ADDR_TYPE_SAPLING + " or " + ADDR_TYPE_AMNESIA + " .\n"
|
"1. \"type\" (string, optional, default=\"" + defaultType + "\") The type of address. Either "+ ADDR_TYPE_SAPLING + " or " + ADDR_TYPE_AMNESIA + " .\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"" + strprintf("%s",komodo_chainname()) + "_address\" (string) The new shielded address.\n"
|
"\"" + strprintf("%s",hush_chainname()) + "_address\" (string) The new shielded address.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("z_getnewaddress", "")
|
+ HelpExampleCli("z_getnewaddress", "")
|
||||||
+ HelpExampleCli("z_getnewaddress", ADDR_TYPE_SAPLING)
|
+ HelpExampleCli("z_getnewaddress", ADDR_TYPE_SAPLING)
|
||||||
|
|||||||
Reference in New Issue
Block a user