|
15 | 15 |
|
16 | 16 | #ifndef H_KOMODO_H |
17 | 17 | #define H_KOMODO_H |
| 18 | +#include "komodo_defs.h" |
18 | 19 |
|
19 | 20 | #ifdef _WIN32 |
20 | 21 | #define printf(...) |
@@ -56,14 +57,14 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char |
56 | 57 |
|
57 | 58 | void komodo_currentheight_set(int32_t height) |
58 | 59 | { |
59 | | - char symbol[16],dest[16]; struct komodo_state *sp; |
| 60 | + char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; struct komodo_state *sp; |
60 | 61 | if ( (sp= komodo_stateptr(symbol,dest)) != 0 ) |
61 | 62 | sp->CURRENT_HEIGHT = height; |
62 | 63 | } |
63 | 64 |
|
64 | 65 | int32_t komodo_currentheight() |
65 | 66 | { |
66 | | - char symbol[16],dest[16]; struct komodo_state *sp; |
| 67 | + char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; struct komodo_state *sp; |
67 | 68 | if ( (sp= komodo_stateptr(symbol,dest)) != 0 ) |
68 | 69 | return(sp->CURRENT_HEIGHT); |
69 | 70 | else return(0); |
@@ -328,7 +329,7 @@ int32_t komodo_parsestatefiledata(struct komodo_state *sp,uint8_t *filedata,long |
328 | 329 | void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t KMDheight,uint32_t KMDtimestamp,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout) |
329 | 330 | { |
330 | 331 | static FILE *fp; static int32_t errs,didinit; |
331 | | - struct komodo_state *sp; char fname[512],symbol[16],dest[16]; int32_t retval,ht,func; uint8_t num,pubkeys[64][33]; |
| 332 | + struct komodo_state *sp; char fname[512],symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; int32_t retval,ht,func; uint8_t num,pubkeys[64][33]; |
332 | 333 | if ( didinit == 0 ) |
333 | 334 | { |
334 | 335 | portable_mutex_init(&KOMODO_KV_mutex); |
@@ -475,7 +476,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar |
475 | 476 | int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen,int32_t height,uint256 txhash,int32_t i,int32_t j,uint64_t *voutmaskp,int32_t *specialtxp,int32_t *notarizedheightp,uint64_t value,int32_t notarized,uint64_t signedmask) |
476 | 477 | { |
477 | 478 | static uint256 zero; static FILE *signedfp; |
478 | | - int32_t opretlen,nid,k,len = 0; uint256 kmdtxid,desttxid; uint8_t crypto777[33]; struct komodo_state *sp; char symbol[16],dest[16]; |
| 479 | + int32_t opretlen,nid,k,len = 0; uint256 kmdtxid,desttxid; uint8_t crypto777[33]; struct komodo_state *sp; char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; |
479 | 480 | if ( (sp= komodo_stateptr(symbol,dest)) == 0 ) |
480 | 481 | return(-1); |
481 | 482 | if ( scriptlen == 35 && scriptbuf[0] == 33 && scriptbuf[34] == 0xac ) |
@@ -633,7 +634,7 @@ int32_t komodo_notarycmp(uint8_t *scriptPubKey,int32_t scriptlen,uint8_t pubkeys |
633 | 634 | void komodo_connectblock(CBlockIndex *pindex,CBlock& block) |
634 | 635 | { |
635 | 636 | static int32_t hwmheight; |
636 | | - uint64_t signedmask,voutmask; char symbol[16],dest[16]; struct komodo_state *sp; |
| 637 | + uint64_t signedmask,voutmask; char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; struct komodo_state *sp; |
637 | 638 | uint8_t scriptbuf[4096],pubkeys[64][33],rmd160[20],scriptPubKey[35]; uint256 kmdtxid,zero,btctxid,txhash; |
638 | 639 | int32_t i,j,k,numnotaries,notarized,scriptlen,isratification,nid,numvalid,specialtx,notarizedheight,notaryid,len,numvouts,numvins,height,txn_count; |
639 | 640 | memset(&zero,0,sizeof(zero)); |
|
0 commit comments