From 7a34c7f56ae453bcb70e46047316b46d0e2d458c Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 20 Jul 2018 01:56:56 -1100 Subject: [PATCH] Test --- src/cc/assets.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/cc/assets.cpp b/src/cc/assets.cpp index 5c4e70863..0e3c0328c 100644 --- a/src/cc/assets.cpp +++ b/src/cc/assets.cpp @@ -190,7 +190,7 @@ CScript EncodeCreateOpRet(uint8_t funcid,std::string name,std::string descriptio return(opret); } -CScript EncodeOpRet(uint8_t funcid,uint256 assetid,uint256 assetid2,uint64_t price,const std::vector origpubkey) +CScript EncodeOpRet(uint8_t funcid,uint256 assetid,uint256 assetid2,uint64_t price,std::vector origpubkey) { CScript opret; uint8_t evalcode = EVAL_ASSETS; switch ( funcid ) @@ -286,10 +286,15 @@ std::string CreateAsset(CPubKey pk,uint64_t assetsupply,uint256 utxotxid,int32_t return(0); } -std::string CreateAssetTransfer(uint256 assetid,const std::vector origpubkey,uint256 utxotxid,int32_t utxovout) +std::string CreateAssetTransfer(uint256 assetid,std::vector origpubkey,uint256 utxotxid,int32_t utxovout) { - std::string hex; CMutableTransaction mtx; CPubKey pk; CTransaction vintx; uint256 hashBlock; uint64_t nValue,change,txfee=10000; - pk.CPubKey(origpubkey); + std::string hex; CMutableTransaction mtx; CPubKey pk; CTransaction vintx; uint256 hashBlock; uint64_t nValue,change,txfee=10000; int32_t i,n; uint8_t *pubkey33,*dest; + n = origpubkey.size(); + pk.resize(n); + dest = pk.begin(); + pubkey33 = (uint8_t *)origpubkey.data(); + for (i=0; i