| 179 | } |
| 180 | |
| 181 | bool CreateRegScriptTx(bool fFlag, string &hash,string regAddress="") { |
| 182 | if(regAddress=="") { |
| 183 | map<string, string>::iterator iterSrcAddr = GetRandAddress(); |
| 184 | regAddress = iterSrcAddr->second; |
| 185 | } |
| 186 | uint64_t nFee = GetRandomFee() + 1 * COIN; |
| 187 | Value ret = DeployContractTx(regAddress, "unit_test.bin", 100, nFee); |
| 188 | BOOST_CHECK(GetHashFromCreatedTx(ret,hash)); |
| 189 | |
| 190 | if(fFlag) { |
| 191 | vTransactionHash.push_back(hash); |
| 192 | if (mempool.mapTx.count(uint256(uint256S(hash))) > 0) { |
| 193 | std::shared_ptr<CBaseTx> tx = mempool.mapTx[uint256(uint256S(hash))].GetTransaction(); |
| 194 | vTransactions.push_back(tx); |
| 195 | } |
| 196 | vSendFee.push_back(make_pair(hash, nFee)); |
| 197 | } |
| 198 | |
| 199 | return true; |
| 200 | } |
| 201 | |
| 202 | //随机创建6000个交易 |
| 203 | void CreateRandTx(int txCount) { |
nothing calls this directly
no test coverage detected