diff --git a/src/cc/CCassetstx.cpp b/src/cc/CCassetstx.cpp index 22ca71c66..51668eda8 100644 --- a/src/cc/CCassetstx.cpp +++ b/src/cc/CCassetstx.cpp @@ -305,6 +305,8 @@ std::string CreateSell(int64_t txfee,int64_t askamount,uint256 assetid,int64_t p std::string CreateSwap(int64_t txfee,int64_t askamount,uint256 assetid,uint256 assetid2,int64_t pricetotal) { CMutableTransaction mtx; CPubKey mypk; uint64_t mask; int64_t inputs,CCchange; CScript opret; struct CCcontract_info *cp,C; + fprintf(stderr,"asset swaps disabled\n"); + return(0); if ( askamount < 0 || pricetotal < 0 ) { fprintf(stderr,"negative askamount %lld, askamount %lld\n",(long long)pricetotal,(long long)askamount); @@ -429,6 +431,12 @@ std::string FillSell(int64_t txfee,uint256 assetid,uint256 assetid2,uint256 askt fprintf(stderr,"negative fillunits %lld\n",(long long)fillunits); return(0); } + if ( assetid2 != zeroid ) + { + fprintf(stderr,"asset swaps disabled\n"); + return(0); + } + cp = CCinit(&C,EVAL_ASSETS); if ( txfee == 0 ) txfee = 10000; diff --git a/src/cc/assets.cpp b/src/cc/assets.cpp index 2088d9b73..8adecb3e4 100644 --- a/src/cc/assets.cpp +++ b/src/cc/assets.cpp @@ -250,9 +250,9 @@ bool AssetsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx } fprintf(stderr,"fillbuy validated\n"); break; - - case 's': // selloffer case 'e': // selloffer + break; // disable swaps + case 's': // selloffer //vin.0: normal input //vin.1+: valid CC output for sale //vout.0: vin.1 assetoshis output to CC to unspendable @@ -323,6 +323,7 @@ bool AssetsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx fprintf(stderr,"fill validated\n"); break; case 'E': // fillexchange + break; // disable asset swaps //vin.0: normal input //vin.1: unspendable.(vout.0 assetoshis from selloffer) sellTx.vout[0] //vin.2+: valid CC assetid2 output that satisfies exchange (*tx.vin[2])->nValue diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 06fdc433b..41228e71a 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -393,10 +393,10 @@ static const CRPCCommand vRPCCommands[] = { "tokens", "tokencancelbid", &tokencancelbid, true }, { "tokens", "tokenfillbid", &tokenfillbid, true }, { "tokens", "tokenask", &tokenask, true }, - { "tokens", "tokenswapask", &tokenswapask, true }, + //{ "tokens", "tokenswapask", &tokenswapask, true }, { "tokens", "tokencancelask", &tokencancelask, true }, { "tokens", "tokenfillask", &tokenfillask, true }, - { "tokens", "tokenfillswap", &tokenfillswap, true }, + //{ "tokens", "tokenfillswap", &tokenfillswap, true }, /* Address index */ { "addressindex", "getaddressmempool", &getaddressmempool, true }, diff --git a/src/rpcserver.h b/src/rpcserver.h index 4b5dcdc2c..f88f1e571 100644 --- a/src/rpcserver.h +++ b/src/rpcserver.h @@ -221,8 +221,8 @@ extern UniValue tokenfillbid(const UniValue& params, bool fHelp); extern UniValue tokenask(const UniValue& params, bool fHelp); extern UniValue tokencancelask(const UniValue& params, bool fHelp); extern UniValue tokenfillask(const UniValue& params, bool fHelp); -extern UniValue tokenswapask(const UniValue& params, bool fHelp); -extern UniValue tokenfillswap(const UniValue& params, bool fHelp); +//extern UniValue tokenswapask(const UniValue& params, bool fHelp); +//extern UniValue tokenfillswap(const UniValue& params, bool fHelp); extern UniValue faucetfund(const UniValue& params, bool fHelp); extern UniValue faucetget(const UniValue& params, bool fHelp); extern UniValue faucetaddress(const UniValue& params, bool fHelp);