Browse Source

Activate maintain MoM and 0.0001

jl777
jl777 7 years ago
parent
commit
268f386b81
  1. 4
      iguana/dPoW.h
  2. 2
      iguana/dpow/dpow_fsm.c
  3. 2
      iguana/dpow/dpow_rpc.c
  4. 2
      iguana/dpow/dpow_tx.c

4
iguana/dPoW.h

@ -23,8 +23,8 @@
#define DPOW_MIN_ASSETCHAIN_SIGS 11 #define DPOW_MIN_ASSETCHAIN_SIGS 11
//#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1) //#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1)
#define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries) #define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries)
#define DPOW_VERSION 0x1781 #define DPOW_VERSION 0x1782
#define DPOW_UTXOSIZE 50000 #define DPOW_UTXOSIZE 10000//50000
#define DPOW_MINOUTPUT 6000 #define DPOW_MINOUTPUT 6000
#define DPOW_DURATION 600 #define DPOW_DURATION 600
#define DPOW_RATIFYDURATION (3600 * 24) #define DPOW_RATIFYDURATION (3600 * 24)

2
iguana/dpow/dpow_fsm.c

@ -271,7 +271,7 @@ int32_t dpow_txhasnotarization(uint64_t *signedmaskp,int32_t *nothtp,struct supe
decode_hex(script,len,hexstr); decode_hex(script,len,hexstr);
if ( dpow_opreturn_parsesrc(&blockhash,nothtp,&txid,symbol,&MoM,&MoMdepth,script,len) > 0 ) if ( dpow_opreturn_parsesrc(&blockhash,nothtp,&txid,symbol,&MoM,&MoMdepth,script,len) > 0 )
{ {
if ( Notaries_port != DPOW_SOCKPORT ) //if ( Notaries_port != DPOW_SOCKPORT )
{ {
if ( bits256_nonz(MoM) == 0 || MoMdepth == 0 || *nothtp >= height || *nothtp < 0 ) if ( bits256_nonz(MoM) == 0 || MoMdepth == 0 || *nothtp >= height || *nothtp < 0 )
*nothtp = 0; *nothtp = 0;

2
iguana/dpow/dpow_rpc.c

@ -230,7 +230,7 @@ int32_t dpow_paxpending(uint8_t *hex,uint32_t *paxwdcrcp,bits256 MoM,uint32_t Mo
{ {
struct iguana_info *coin; char *retstr,*hexstr; cJSON *retjson; int32_t n=0; uint32_t paxwdcrc; struct iguana_info *coin; char *retstr,*hexstr; cJSON *retjson; int32_t n=0; uint32_t paxwdcrc;
paxwdcrc = 0; paxwdcrc = 0;
if ( Notaries_port != DPOW_SOCKPORT ) //if ( Notaries_port != DPOW_SOCKPORT )
{ {
n += iguana_rwbignum(1,&hex[n],sizeof(MoM),MoM.bytes); n += iguana_rwbignum(1,&hex[n],sizeof(MoM),MoM.bytes);
n += iguana_rwnum(1,&hex[n],sizeof(MoMdepth),(uint32_t *)&MoMdepth); n += iguana_rwnum(1,&hex[n],sizeof(MoMdepth),(uint32_t *)&MoMdepth);

2
iguana/dpow/dpow_tx.c

@ -232,7 +232,7 @@ int32_t dpow_voutstandard(struct dpow_block *bp,uint8_t *serialized,int32_t m,in
printf("%02x",extras[i]); printf("%02x",extras[i]);
printf(" <- withdraw.%d %08x\n",n,paxwdcrc); printf(" <- withdraw.%d %08x\n",n,paxwdcrc);
} }
else if ( Notaries_port != DPOW_SOCKPORT && bp->MoMdepth > 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 ) // only testnets for now else if ( bp->MoMdepth > 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 ) // Notaries_port != DPOW_SOCKPORT &&
{ {
n = dpow_paxpending(extras,&paxwdcrc,bp->MoM,bp->MoMdepth); n = dpow_paxpending(extras,&paxwdcrc,bp->MoM,bp->MoMdepth);
//n += iguana_rwbignum(1,&extras[n],sizeof(bp->MoM),bp->MoM.bytes); //n += iguana_rwbignum(1,&extras[n],sizeof(bp->MoM),bp->MoM.bytes);

Loading…
Cancel
Save