Gateways (#3)

- Changed gateways withdrawal flow
- Added txnotarizedconfirmed function to check if transaction is confirmed/notarized
- Fixed max number of inputs when adding in varuous CC functions
- Added TESTMODE to set CC confirmation tx to 2 blocks instead of 60
This commit is contained in:
Mihailo Milenkovic
2018-11-26 20:32:57 +01:00
committed by GitHub
parent 0ca564da8c
commit 16f5598f36
15 changed files with 997 additions and 476 deletions

View File

@@ -739,7 +739,7 @@ std::string OracleCreate(int64_t txfee,std::string name,std::string description,
txfee = 10000;
mypk = pubkey2pk(Mypubkey());
Oraclespk = GetUnspendable(cp,0);
if ( AddNormalinputs(mtx,mypk,2*txfee,1) > 0 )
if ( AddNormalinputs(mtx,mypk,2*txfee,3) > 0 )
{
mtx.vout.push_back(CTxOut(txfee,CScript() << ParseHex(HexStr(Oraclespk)) << OP_CHECKSIG));
return(FinalizeCCTx(0,cp,mtx,mypk,txfee,EncodeOraclesCreateOpRet('C',name,description,format)));
@@ -778,7 +778,7 @@ std::string OracleSubscribe(int64_t txfee,uint256 oracletxid,CPubKey publisher,i
txfee = 10000;
mypk = pubkey2pk(Mypubkey());
markerpubkey = CCtxidaddr(markeraddr,oracletxid);
if ( AddNormalinputs(mtx,mypk,amount + 2*txfee,1) > 0 )
if ( AddNormalinputs(mtx,mypk,amount + 2*txfee,64) > 0 )
{
mtx.vout.push_back(MakeCC1vout(cp->evalcode,amount,publisher));
mtx.vout.push_back(CTxOut(txfee,CScript() << ParseHex(HexStr(markerpubkey)) << OP_CHECKSIG));