update
This commit is contained in:
@@ -496,13 +496,13 @@ channelsopen:
|
||||
Used to open channel between two pub keys (sender and receiver). Parameters: destination_pubkey, total_number_of_payments, payment_denomination.
|
||||
Example - channelsopen 03a8fe537de2ace0d9c210b0ff945085c9192c9abf56ea22f22ce7998f289bb7bb 10 10000000
|
||||
channelspayment:
|
||||
Sending payment to receiver. Condition is that the channel open tx is confirmed/notarised. Parameters: open_tx_id, payment_amount, [secret] (optional, used when receiver needs to make a payment which secret has already been revealed by sender).
|
||||
Sending payment to receiver. Condition is that the channel open tx is confirmed/notarized. Parameters: open_tx_id, payment_amount, [secret] (optional, used when receiver needs to make a payment which secret has already been revealed by sender).
|
||||
Example - channelspayment b9c141facc8cb71306d0de8e525b3de1450e93e17fc8799c8fda5ed52fd14440 20000000
|
||||
channelsclose:
|
||||
Marking channel as closed. This RPC only creates a tx which says that the channel is closed and will be used in refund RPC to withdraw funds from closed channel. This also notifies receiver that channel fund could be withdrawn, but the payment RPC is still available until all funds are withdrawn. Parameters: open_tx_id.
|
||||
Example - channelsclose b9c141facc8cb71306d0de8e525b3de1450e93e17fc8799c8fda5ed52fd14440
|
||||
channelsrefund:
|
||||
Withdrawing funds back to senders address. Refund can be issued only when channel close tx is confirmed/notarised. Parameters: open_tx_id, close_tx_id
|
||||
Withdrawing funds back to senders address. Refund can be issued only when channel close tx is confirmed/notarized. Parameters: open_tx_id, close_tx_id
|
||||
Example - channelsrefund b9c141facc8cb71306d0de8e525b3de1450e93e17fc8799c8fda5ed52fd14440 bb0ea34f846247642684c7c541c435b06ee79e47893640e5d2e51023841677fd
|
||||
channelsinfo:
|
||||
Getting info about channels in which the issuer is involved, either as sender or receiver. Call without parameters give the list of available channels. Parameters: [open_tx_id] (optional - used to get info about specific channel)
|
||||
|
||||
@@ -164,7 +164,7 @@ bool GetOpReturnHash(CScript script, uint256 &hash)
|
||||
|
||||
/*
|
||||
* Crypto-Condition EVAL method that verifies a payout against a transaction
|
||||
* notarised on another chain.
|
||||
* notarized on another chain.
|
||||
*
|
||||
* IN: params - condition params
|
||||
* IN: importTx - Payout transaction on value chain (HUSH)
|
||||
@@ -219,7 +219,7 @@ bool Eval::ImportPayout(const std::vector<uint8_t> params, const CTransaction &i
|
||||
// Check disputeTx solves momproof from vout[0]
|
||||
{
|
||||
NotarizationData data(0);
|
||||
if (!GetNotarizationData(proof.notarisationHash, data))
|
||||
if (!GetNotarizationData(proof.notarizationHash, data))
|
||||
return Invalid("coudnt-load-mom");
|
||||
|
||||
if (data.MoM != proof.branch.Exec(disputeTx.GetHash()))
|
||||
|
||||
@@ -29,12 +29,12 @@ class MoMProof
|
||||
{
|
||||
public:
|
||||
MerkleBranch branch;
|
||||
uint256 notarisationHash;
|
||||
uint256 notarizationHash;
|
||||
ADD_SERIALIZE_METHODS;
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action) {
|
||||
READWRITE(branch);
|
||||
READWRITE(notarisationHash);
|
||||
READWRITE(notarizationHash);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ bool ChannelsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &
|
||||
else if ( ConstrainVout(channelOpenTx.vout[2],1,destmarker,CC_MARKER_VALUE)==0 )
|
||||
return eval->Invalid("vout.2 is CC marker to destpub or invalid amount for channelopen!");
|
||||
else if (hush_txnotarizedconfirmed(opentxid) == 0)
|
||||
return eval->Invalid("channelopen is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("channelopen is not yet confirmed(notarized)!");
|
||||
else if ( IsCCInput(tx.vin[0].scriptSig) != 0 )
|
||||
return eval->Invalid("vin.0 is normal for channelpayment!");
|
||||
else if ( IsCCInput(tx.vin[tx.vin.size()-2].scriptSig) == 0 )
|
||||
@@ -311,7 +311,7 @@ bool ChannelsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &
|
||||
else if ( ConstrainVout(channelOpenTx.vout[2],1,destmarker,CC_MARKER_VALUE)==0 )
|
||||
return eval->Invalid("vout.2 is CC marker to destpub or invalid amount for channelopen!");
|
||||
else if (hush_txnotarizedconfirmed(opentxid) == 0)
|
||||
return eval->Invalid("channelopen is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("channelopen is not yet confirmed(notarized)!");
|
||||
else if ( IsCCInput(tx.vin[0].scriptSig) != 0 )
|
||||
return eval->Invalid("vin.0 is normal for channelclose!");
|
||||
else if ( IsCCInput(tx.vin[tx.vin.size()-2].scriptSig) == 0 )
|
||||
@@ -352,9 +352,9 @@ bool ChannelsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &
|
||||
else if ( ConstrainVout(channelOpenTx.vout[2],1,destmarker,CC_MARKER_VALUE)==0 )
|
||||
return eval->Invalid("vout.2 is CC marker to destpub or invalid amount for channelopen!");
|
||||
else if (hush_txnotarizedconfirmed(opentxid) == 0)
|
||||
return eval->Invalid("channelopen is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("channelopen is not yet confirmed(notarized)!");
|
||||
else if (hush_txnotarizedconfirmed(param3) == 0)
|
||||
return eval->Invalid("channelClose is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("channelClose is not yet confirmed(notarized)!");
|
||||
else if ( IsCCInput(tx.vin[0].scriptSig) != 0 )
|
||||
return eval->Invalid("vin.0 is normal for channelrefund!");
|
||||
else if ( IsCCInput(tx.vin[tx.vin.size()-2].scriptSig) == 0 )
|
||||
|
||||
@@ -180,14 +180,14 @@ bool Eval::CheckNotaryInputs(const CTransaction &tx, uint32_t height, uint32_t t
|
||||
return CheckTxAuthority(tx, auth);
|
||||
}
|
||||
|
||||
// Get MoM from a notarisation tx hash (on HUSH)
|
||||
// Get MoM from a notarization tx hash (on HUSH)
|
||||
bool Eval::GetNotarizationData(const uint256 notaryHash, NotarizationData &data) const
|
||||
{
|
||||
CTransaction notarisationTx;
|
||||
CTransaction notarizationTx;
|
||||
CBlockIndex block;
|
||||
if (!GetTxConfirmed(notaryHash, notarisationTx, block)) return false;
|
||||
if (!CheckNotaryInputs(notarisationTx, block.GetHeight(), block.nTime)) return false;
|
||||
if (!ParseNotarizationOpReturn(notarisationTx, data)) return false;
|
||||
if (!GetTxConfirmed(notaryHash, notarizationTx, block)) return false;
|
||||
if (!CheckNotaryInputs(notarizationTx, block.GetHeight(), block.nTime)) return false;
|
||||
if (!ParseNotarizationOpReturn(notarizationTx, data)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ std::string Eval::GetAssetchainsSymbol() const
|
||||
|
||||
|
||||
/*
|
||||
* Notarization data, ie, OP_RETURN payload in notarisation transactions
|
||||
* Notarization data, ie, OP_RETURN payload in notarization transactions
|
||||
*/
|
||||
bool ParseNotarizationOpReturn(const CTransaction &tx, NotarizationData &data)
|
||||
{
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
virtual bool GetSpendsConfirmed(uint256 hash, std::vector<CTransaction> &spends) const;
|
||||
virtual bool GetBlock(uint256 hash, CBlockIndex& blockIdx) const;
|
||||
virtual int32_t GetNotaries(uint8_t pubkeys[64][33], int32_t height, uint32_t timestamp) const;
|
||||
virtual bool GetNotarizationData(uint256 notarisationHash, NotarizationData &data) const;
|
||||
virtual bool GetNotarizationData(uint256 notarizationHash, NotarizationData &data) const;
|
||||
virtual bool CheckNotaryInputs(const CTransaction &tx, uint32_t height, uint32_t timestamp) const;
|
||||
virtual uint32_t GetAssetchainsCC() const;
|
||||
virtual std::string GetAssetchainsSymbol() const;
|
||||
@@ -158,7 +158,7 @@ extern char SMART_CHAIN_SYMBOL[65];
|
||||
|
||||
|
||||
/*
|
||||
* Data from notarisation OP_RETURN from chain being notarised
|
||||
* Data from notarization OP_RETURN from chain being notarized
|
||||
*/
|
||||
class NotarizationData
|
||||
{
|
||||
|
||||
@@ -613,7 +613,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
return eval->Invalid(validationError);
|
||||
}
|
||||
else if (hush_txnotarizedconfirmed(bindtxid) == false)
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(deposittxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid gatewaysdeposittxid!");
|
||||
else if ((numvouts=tmptx.vout.size()) < 1 || DecodeGatewaysDepositOpRet(tmptx.vout[numvouts-1].scriptPubKey,tmptxid,tmprefcoin,tmppublishers,txids,height,cointxid,claimvout,hex,proof,tmppubkey,tmpamount) != 'D')
|
||||
@@ -631,7 +631,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
else if (tmpamount>totalsupply)
|
||||
return eval->Invalid("deposit amount greater then bind total supply");
|
||||
else if (hush_txnotarizedconfirmed(deposittxid) == false)
|
||||
return eval->Invalid("gatewaysdeposit tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewaysdeposit tx is not yet confirmed(notarized)!");
|
||||
else if (tx.vin.size()>0)
|
||||
{
|
||||
i=0;
|
||||
@@ -705,7 +705,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
else if ( ConstrainVout(tmptx.vout[1],1,gatewaystokensaddr,amount)==0)
|
||||
return eval->Invalid("invalid tokens to gateways vout for gatewaysWithdraw!");
|
||||
else if (hush_txnotarizedconfirmed(withdrawtxid) == false)
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(bindtxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid gatewaysbind txid!");
|
||||
else if ((numvouts=tmptx.vout.size()) < 1 || DecodeGatewaysBindOpRet(depositaddr,tmptx.vout[numvouts-1].scriptPubKey,tokenid,tmprefcoin,totalsupply,oracletxid,M,N,pubkeys,taddr,prefix,prefix2,wiftype) != 'B')
|
||||
@@ -715,7 +715,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
else if (tmptokenid!=tokenid)
|
||||
return eval->Invalid("tokenid does not match tokenid from gatewaysbind");
|
||||
else if (hush_txnotarizedconfirmed(bindtxid) == false)
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarized)!");
|
||||
else if (IsCCInput(tx.vin[0].scriptSig) != 0)
|
||||
return eval->Invalid("vin.0 is normal for gatewayspartialsign!");
|
||||
else if ((*cp->ismyvin)(tx.vin[tx.vin.size()-1].scriptSig) == 0 || myGetTransaction(tx.vin[tx.vin.size()-1].prevout.hash,tmptx,hashblock)==0 || tmptx.vout[tx.vin[tx.vin.size()-1].prevout.n].nValue!=CC_MARKER_VALUE)
|
||||
@@ -747,7 +747,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
else if (tmptx.vout[1].nValue!=amount)
|
||||
return eval->Invalid("amount in opret not matching tx tokens amount!");
|
||||
else if (hush_txnotarizedconfirmed(withdrawtxid) == false)
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(bindtxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid gatewaysbind txid!");
|
||||
else if ((numvouts=tmptx.vout.size()) < 1 || DecodeGatewaysBindOpRet(depositaddr,tmptx.vout[numvouts-1].scriptPubKey,tokenid,tmprefcoin,totalsupply,oracletxid,M,N,pubkeys,taddr,prefix,prefix2,wiftype) != 'B')
|
||||
@@ -757,7 +757,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
else if (tmptokenid!=tokenid)
|
||||
return eval->Invalid("tokenid does not match tokenid from gatewaysbind");
|
||||
else if (hush_txnotarizedconfirmed(bindtxid) == false)
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarized)!");
|
||||
else if (IsCCInput(tx.vin[0].scriptSig) != 0)
|
||||
return eval->Invalid("vin.0 is normal for gatewayscompletesigning!");
|
||||
else if ((*cp->ismyvin)(tx.vin[tx.vin.size()-1].scriptSig) == 0 || myGetTransaction(tx.vin[tx.vin.size()-1].prevout.hash,tmptx,hashblock)==0 || tmptx.vout[tx.vin[tx.vin.size()-1].prevout.n].nValue!=CC_MARKER_VALUE)
|
||||
@@ -778,7 +778,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
else if ((numvouts=tmptx.vout.size()) > 0 && DecodeGatewaysCompleteSigningOpRet(tmptx.vout[numvouts-1].scriptPubKey,withdrawtxid,tmprefcoin,K,hex)!='S')
|
||||
return eval->Invalid("invalid gatewayscompletesigning OP_RETURN data!");
|
||||
else if (hush_txnotarizedconfirmed(completetxid) == false)
|
||||
return eval->Invalid("gatewayscompletesigning tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewayscompletesigning tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(withdrawtxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid withdraw txid!");
|
||||
else if ((numvouts=tmptx.vout.size()) > 0 && DecodeGatewaysWithdrawOpRet(tmptx.vout[numvouts-1].scriptPubKey,tmptokenid,bindtxid,tmprefcoin,pubkey,amount)!='W')
|
||||
@@ -786,7 +786,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
else if (tmprefcoin!=refcoin)
|
||||
return eval->Invalid("refcoin different than in bind tx");
|
||||
else if (hush_txnotarizedconfirmed(withdrawtxid) == false)
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(bindtxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid gatewaysbind txid!");
|
||||
else if ((numvouts=tmptx.vout.size()) < 1 || DecodeGatewaysBindOpRet(depositaddr,tmptx.vout[numvouts-1].scriptPubKey,tokenid,tmprefcoin,totalsupply,oracletxid,M,N,pubkeys,taddr,prefix,prefix2,wiftype) != 'B')
|
||||
@@ -796,7 +796,7 @@ bool GatewaysValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &
|
||||
else if (tmptokenid!=tokenid)
|
||||
return eval->Invalid("tokenid does not match tokenid from gatewaysbind");
|
||||
else if (hush_txnotarizedconfirmed(bindtxid) == false)
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarized)!");
|
||||
else if ( IsCCInput(tx.vin[0].scriptSig) != 0 )
|
||||
return eval->Invalid("vin.0 is normal for gatewaysmarkdone!");
|
||||
else if ((*cp->ismyvin)(tx.vin[tx.vin.size()-1].scriptSig) == 0 || myGetTransaction(tx.vin[tx.vin.size()-1].prevout.hash,tmptx,hashblock)==0 || tmptx.vout[tx.vin[tx.vin.size()-1].prevout.n].nValue!=CC_MARKER_VALUE)
|
||||
|
||||
@@ -361,7 +361,7 @@ bool ImportGatewayValidate(struct CCcontract_info *cp,Eval *eval,const CTransact
|
||||
else if (tmptx.vout[1].nValue!=amount)
|
||||
return eval->Invalid("amount in opret not matching tx tokens amount!");
|
||||
else if (hush_txnotarizedconfirmed(withdrawtxid) == false)
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(bindtxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid gatewaysbind txid!");
|
||||
else if ((numvouts=tmptx.vout.size()) < 1 || DecodeImportGatewayBindOpRet(burnaddr,tmptx.vout[numvouts-1].scriptPubKey,tmprefcoin,oracletxid,M,N,pubkeys,taddr,prefix,prefix2,wiftype) != 'B')
|
||||
@@ -369,7 +369,7 @@ bool ImportGatewayValidate(struct CCcontract_info *cp,Eval *eval,const CTransact
|
||||
else if (tmprefcoin!=refcoin)
|
||||
return eval->Invalid("refcoin different than in bind tx");
|
||||
else if (hush_txnotarizedconfirmed(bindtxid) == false)
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarized)!");
|
||||
else if (IsCCInput(tx.vin[0].scriptSig) != 0)
|
||||
return eval->Invalid("vin.0 is normal for gatewayspartialsign!");
|
||||
else if ((*cp->ismyvin)(tx.vin[1].scriptSig) == 0 || myGetTransaction(tx.vin[1].prevout.hash,tmptx,hashblock)==0 || tmptx.vout[tx.vin[1].prevout.n].nValue!=CC_MARKER_VALUE)
|
||||
@@ -403,7 +403,7 @@ bool ImportGatewayValidate(struct CCcontract_info *cp,Eval *eval,const CTransact
|
||||
else if (tmptx.vout[1].nValue!=amount)
|
||||
return eval->Invalid("amount in opret not matching tx tokens amount!");
|
||||
else if (hush_txnotarizedconfirmed(withdrawtxid) == false)
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(bindtxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid gatewaysbind txid!");
|
||||
else if ((numvouts=tmptx.vout.size()) < 1 || DecodeImportGatewayBindOpRet(burnaddr,tmptx.vout[numvouts-1].scriptPubKey,tmprefcoin,oracletxid,M,N,pubkeys,taddr,prefix,prefix2,wiftype) != 'B')
|
||||
@@ -411,7 +411,7 @@ bool ImportGatewayValidate(struct CCcontract_info *cp,Eval *eval,const CTransact
|
||||
else if (tmprefcoin!=refcoin)
|
||||
return eval->Invalid("refcoin different than in bind tx");
|
||||
else if (hush_txnotarizedconfirmed(bindtxid) == false)
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarized)!");
|
||||
else if (IsCCInput(tx.vin[0].scriptSig) != 0)
|
||||
return eval->Invalid("vin.0 is normal for gatewayscompletesigning!");
|
||||
else if ((*cp->ismyvin)(tx.vin[1].scriptSig) == 0 || myGetTransaction(tx.vin[1].prevout.hash,tmptx,hashblock)==0 || tmptx.vout[tx.vin[1].prevout.n].nValue!=CC_MARKER_VALUE)
|
||||
@@ -432,7 +432,7 @@ bool ImportGatewayValidate(struct CCcontract_info *cp,Eval *eval,const CTransact
|
||||
else if ((numvouts=tmptx.vout.size()) > 0 && DecodeImportGatewayCompleteSigningOpRet(tmptx.vout[numvouts-1].scriptPubKey,withdrawtxid,tmprefcoin,K,hex)!='S')
|
||||
return eval->Invalid("invalid gatewayscompletesigning OP_RETURN data!");
|
||||
else if (hush_txnotarizedconfirmed(completetxid) == false)
|
||||
return eval->Invalid("gatewayscompletesigning tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewayscompletesigning tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(withdrawtxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid withdraw txid!");
|
||||
else if ((numvouts=tmptx.vout.size()) > 0 && DecodeImportGatewayWithdrawOpRet(tmptx.vout[numvouts-1].scriptPubKey,bindtxid,tmprefcoin,pubkey,amount)!='W')
|
||||
@@ -440,7 +440,7 @@ bool ImportGatewayValidate(struct CCcontract_info *cp,Eval *eval,const CTransact
|
||||
else if (tmprefcoin!=refcoin)
|
||||
return eval->Invalid("refcoin different than in bind tx");
|
||||
else if (hush_txnotarizedconfirmed(withdrawtxid) == false)
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewayswithdraw tx is not yet confirmed(notarized)!");
|
||||
else if (myGetTransaction(bindtxid,tmptx,hashblock) == 0)
|
||||
return eval->Invalid("invalid gatewaysbind txid!");
|
||||
else if ((numvouts=tmptx.vout.size()) < 1 || DecodeImportGatewayBindOpRet(burnaddr,tmptx.vout[numvouts-1].scriptPubKey,tmprefcoin,oracletxid,M,N,pubkeys,taddr,prefix,prefix2,wiftype) != 'B')
|
||||
@@ -448,7 +448,7 @@ bool ImportGatewayValidate(struct CCcontract_info *cp,Eval *eval,const CTransact
|
||||
else if (tmprefcoin!=refcoin)
|
||||
return eval->Invalid("refcoin different than in bind tx");
|
||||
else if (hush_txnotarizedconfirmed(bindtxid) == false)
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarised)!");
|
||||
return eval->Invalid("gatewaysbind tx is not yet confirmed(notarized)!");
|
||||
else if ( IsCCInput(tx.vin[0].scriptSig) != 0 )
|
||||
return eval->Invalid("vin.0 is normal for gatewaysmarkdone!");
|
||||
else if ((*cp->ismyvin)(tx.vin[1].scriptSig) == 0 || myGetTransaction(tx.vin[1].prevout.hash,tmptx,hashblock)==0 || tmptx.vout[tx.vin[1].prevout.n].nValue!=CC_MARKER_VALUE)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/*
|
||||
* Crypto-Condition EVAL method that verifies a payout against a transaction
|
||||
* notarised on another chain.
|
||||
* notarized on another chain.
|
||||
*
|
||||
* IN: params - condition params
|
||||
* IN: importTx - Payout transaction on value chain (HUSH)
|
||||
@@ -83,7 +83,7 @@ bool Eval::ImportPayout(const std::vector<uint8_t> params, const CTransaction &i
|
||||
// Check disputeTx solves momproof from vout[0]
|
||||
{
|
||||
NotarizationData data;
|
||||
if (!GetNotarizationData(proof.notarisationHash, data))
|
||||
if (!GetNotarizationData(proof.notarizationHash, data))
|
||||
return Invalid("coudnt-load-mom");
|
||||
|
||||
if (data.MoM != proof.Exec(disputeTx.GetHash()))
|
||||
|
||||
Reference in New Issue
Block a user