1. Bitcoin

Find lost Bitcoin transactions in Electrum

In this article we will discuss one common thing which new to Electrum users may face and get very scared. You are being paid, but transaction does not appear in the wallet and Bitcoin balance is not updated. Usually this happens when you accept Bitcoin payments via some automated software to your Electrum wallet.

Problem

New transactions do not appear in the Electrum wallet or some old transactions are lost or not displayed.

Why this happens

When you accept BTC payments via some automated scripts (like BTCPayServer), the gateway generates a new wallet address every time somebody pays you. This wallet address is generated with your Bitcoin Public key (xpub) to make sure that new address belongs to the same wallet (yours).

Unlimited number of new wallet addresses can be derived from same public key. So, there are can be hundreds of thousands of addresses which belong to same wallet. And every address can hold portion of the balance, collect some payments.

By default, Electrum will scan first 20 addresses derived from your public key and you will see a total balance and transactions from/to these addresses. And in case, the payment is sent to address #101, you will not see this transaction. Luckily there is an easy fix to find lost transactions.

Find lost Bitcoin transactions

To display lost transactions we need to increase number of scanned addresses in the Electrum wallet. This is called gap limit.

To increase gap limit, we first need to enable Console. Open Electrum “View” > “Show Console”

Enable console in Electrum

You will see how the new Console tab appears. Follow it and enter the command below:

wallet.change_gap_limit(X)

Change X with the number of addresses you want Electrum to scan. Usually 500 is more than enough to detect any lost Bitcoin transactions.

Change gap limit Electrum

After you increase the gap limit, Electrum will re-scan your wallet and most likely you will see the transactions which were considered lost.