Browse Source

Limit notarization duration to 300 seconds

patch-5
jl777 7 years ago
parent
commit
893dba3ef2
  1. 2
      iguana/dPoW.h
  2. 4
      iguana/dpow/dpow_fsm.c
  3. 4
      iguana/iguana_notary.c

2
iguana/dPoW.h

@ -29,7 +29,7 @@
#define DPOW_VERSION 0x1782
#define DPOW_UTXOSIZE dpow_utxosize(coin->symbol) //10000
#define DPOW_MINOUTPUT 6000
#define DPOW_DURATION 1200
#define DPOW_DURATION 300
#define DPOW_RATIFYDURATION (3600 * 24)
//#define DPOW_ENTRIESCHANNEL ('e' | ('n' << 8) | ('t' << 16) | ('r' << 24))

4
iguana/dpow/dpow_fsm.c

@ -519,7 +519,7 @@ void dpow_statemachinestart(void *ptr)
free(destlockunspent);
}
if ( 0 && strcmp("BTC",dest->symbol) == 0 )
if ( strcmp("KMD",src->symbol) == 0 )
{
// lock the src coin selected utxo if the source coin is KMD.
srclockunspent = dpow_lockunspent(myinfo,bp->srccoin,srcaddr,bits256_str(str2,ep->src.prev_hash),ep->src.prev_vout);
@ -634,7 +634,7 @@ void dpow_statemachinestart(void *ptr)
}
// unlock the src selected utxo on KMD, as those are the only ones we LOCK, and CHIPS does not like the lockunspent call.
if ( 0 && strcmp("BTC",dest->symbol) == 0 )
if ( strcmp("BTC",src->symbol) == 0 )
{
srcunlockunspent = dpow_unlockunspent(myinfo,bp->srccoin,srcaddr,bits256_str(str2,ep->src.prev_hash),ep->src.prev_vout);
if (strncmp(srcunlockunspent,"true", 4) == 0 )

4
iguana/iguana_notary.c

@ -127,9 +127,9 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
ptrs[0] = (void *)myinfo;
ptrs[1] = (void *)dp;
ptrs[2] = (void *)(uint64_t)dp->minsigs;
if ( strcmp(dp->dest,"KMD") != 0 )
//if ( strcmp(dp->dest,"KMD") != 0 )
ptrs[3] = (void *)DPOW_DURATION;
else ptrs[3] = (void *)(DPOW_DURATION * 60); // essentially try forever for assetchains
//else ptrs[3] = (void *)(DPOW_DURATION * 60); // essentially try forever for assetchains
ptrs[4] = 0;
memcpy(&ptrs[5],&checkpoint,sizeof(checkpoint));
dp->activehash = checkpoint.blockhash.hash;

Loading…
Cancel
Save