Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
251ret = false;252break;253}254}256if (ret) {257uint256 comp_checksum = hasher.GetHash();258if (checksum.IsNull()) {259error = _("Error: Missing checksum");260ret = false;261} else if (checksum != comp_checksum) {262error = strprintf(_("Error: Dumpfile checksum does not match. Computed %s, expected %s"), HexStr(comp_checksum), HexStr(checksum));263ret = false;264}265}267if (ret) {268batch->TxnCommit();269} else {270batch->TxnAbort();271}273batch.reset();275dump_file.close();276}277// On failure, gather the paths to remove278std::vector<fs::path> paths_to_remove = wallet->GetDatabase().Files();279if (!name.empty()) paths_to_remove.push_back(wallet_path);281wallet.reset(); // The pointer deleter will close the wallet for us.283// Remove the wallet dir if we have a failure284if (!ret) {285for (const auto& p : paths_to_remove) {286fs::remove(p);287}288}290return ret;291}292} // namespace wallet