| 408 | } |
| 409 | |
| 410 | void ThreadRelayTx(CWallet* pWallet) { |
| 411 | RenameThread("coin-relaytx"); |
| 412 | while (pWallet) { |
| 413 | MilliSleep(60 * 1000); |
| 414 | map<uint256, std::shared_ptr<CBaseTx> > relayTxMap; |
| 415 | { |
| 416 | LOCK(pWallet->cs_wallet); |
| 417 | relayTxMap = pWallet->unconfirmedTx; // copy the tx map to avoid cycle thread lock |
| 418 | } |
| 419 | for (auto item : relayTxMap) { |
| 420 | if (mempool.Exists(item.first)) { |
| 421 | RelayTransaction(item.second.get(), item.first); |
| 422 | LogPrint(BCLog::NET, "ThreadRelayTx resend tx hash:%s time:%ld\n", item.first.GetHex(), GetTime()); |
| 423 | } |
| 424 | } |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | bool BackupWallet(const CWallet& wallet, const string& strDest) { |
| 429 | while (true) { |
nothing calls this directly
no test coverage detected