MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / CreateRegScriptTx

Method CreateRegScriptTx

src/tests/pressure_tests.cpp:181–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 6

GetRandAddressFunction · 0.85
uint256SFunction · 0.85
push_backMethod · 0.80
GetTransactionMethod · 0.80
uint256Class · 0.50
countMethod · 0.45

Tested by

no test coverage detected