remove sign from time lock check
This commit is contained in:
@@ -296,12 +296,12 @@ bool CoinbaseGuardValidate(struct CCcontract_info *cp, Eval* eval, const CTransa
|
|||||||
|
|
||||||
if (GetCCParams(eval, tx, nIn, txOut, preConditions, params))
|
if (GetCCParams(eval, tx, nIn, txOut, preConditions, params))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (preConditions.size() > 0 && params.size() > 0)
|
if (preConditions.size() > 0 && params.size() > 0)
|
||||||
{
|
{
|
||||||
COptCCParams ccp = COptCCParams(preConditions[1]);
|
COptCCParams ccp = COptCCParams(preConditions[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we
|
||||||
|
|
||||||
// check any applicable time lock
|
// check any applicable time lock
|
||||||
// determine who signed
|
// determine who signed
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ int64_t MAX_MONEY = 200000000 * 100000000LL;
|
|||||||
// to be verifiable, timelocks require additional data that enables them to be validated and their ownership and
|
// to be verifiable, timelocks require additional data that enables them to be validated and their ownership and
|
||||||
// release time determined from the blockchain. to do this, every time locked output according to this
|
// release time determined from the blockchain. to do this, every time locked output according to this
|
||||||
// spec will use an op_return with CLTV at front and anything after |OP_RETURN|PUSH of rest|OPRETTYPE_TIMELOCK|script|
|
// spec will use an op_return with CLTV at front and anything after |OP_RETURN|PUSH of rest|OPRETTYPE_TIMELOCK|script|
|
||||||
#define _ASSETCHAINS_TIMELOCKOFF -1
|
#define _ASSETCHAINS_TIMELOCKOFF 0xffffffffffffffff
|
||||||
int64_t ASSETCHAINS_TIMELOCKGTE = _ASSETCHAINS_TIMELOCKOFF;
|
uint64_t ASSETCHAINS_TIMELOCKGTE = _ASSETCHAINS_TIMELOCKOFF;
|
||||||
uint64_t ASSETCHAINS_TIMEUNLOCKFROM = 0, ASSETCHAINS_TIMEUNLOCKTO = 0;
|
uint64_t ASSETCHAINS_TIMEUNLOCKFROM = 0, ASSETCHAINS_TIMEUNLOCKTO = 0;
|
||||||
|
|
||||||
uint32_t ASSETCHAINS_LASTERA = 1;
|
uint32_t ASSETCHAINS_LASTERA = 1;
|
||||||
|
|||||||
@@ -1724,7 +1724,7 @@ void komodo_args(char *argv0)
|
|||||||
}
|
}
|
||||||
ASSETCHAINS_LASTERA -= 1;
|
ASSETCHAINS_LASTERA -= 1;
|
||||||
|
|
||||||
ASSETCHAINS_TIMELOCKGTE = GetArg("-ac_timelockgte", _ASSETCHAINS_TIMELOCKOFF);
|
ASSETCHAINS_TIMELOCKGTE = (uint64_t)GetArg("-ac_timelockgte", _ASSETCHAINS_TIMELOCKOFF);
|
||||||
ASSETCHAINS_TIMEUNLOCKFROM = GetArg("-ac_timeunlockfrom", 0);
|
ASSETCHAINS_TIMEUNLOCKFROM = GetArg("-ac_timeunlockfrom", 0);
|
||||||
ASSETCHAINS_TIMEUNLOCKTO = GetArg("-ac_timeunlockto", 0);
|
ASSETCHAINS_TIMEUNLOCKTO = GetArg("-ac_timeunlockto", 0);
|
||||||
if ( ASSETCHAINS_TIMEUNLOCKFROM > ASSETCHAINS_TIMEUNLOCKTO )
|
if ( ASSETCHAINS_TIMEUNLOCKFROM > ASSETCHAINS_TIMEUNLOCKTO )
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
extern int64_t ASSETCHAINS_TIMELOCKGTE;
|
extern uint64_t ASSETCHAINS_TIMELOCKGTE;
|
||||||
extern uint32_t ASSETCHAINS_ALGO, ASSETCHAINS_VERUSHASH;
|
extern uint32_t ASSETCHAINS_ALGO, ASSETCHAINS_VERUSHASH;
|
||||||
int64_t komodo_block_unlocktime(uint32_t nHeight);
|
int64_t komodo_block_unlocktime(uint32_t nHeight);
|
||||||
|
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ void CTxMemPool::remove(const CTransaction &origTx, std::list<CTransaction>& rem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int64_t ASSETCHAINS_TIMELOCKGTE;
|
extern uint64_t ASSETCHAINS_TIMELOCKGTE;
|
||||||
int64_t komodo_block_unlocktime(uint32_t nHeight);
|
int64_t komodo_block_unlocktime(uint32_t nHeight);
|
||||||
|
|
||||||
void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags)
|
void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#include "paymentdisclosuredb.h"
|
#include "paymentdisclosuredb.h"
|
||||||
|
|
||||||
using namespace libzcash;
|
using namespace libzcash;
|
||||||
extern int64_t ASSETCHAINS_TIMELOCKGTE;
|
extern uint64_t ASSETCHAINS_TIMELOCKGTE;
|
||||||
|
|
||||||
static int find_output(UniValue obj, int n) {
|
static int find_output(UniValue obj, int n) {
|
||||||
UniValue outputMapValue = find_value(obj, "outputmap");
|
UniValue outputMapValue = find_value(obj, "outputmap");
|
||||||
|
|||||||
Reference in New Issue
Block a user