Bitcoin Forum
October 28, 2026, 02:17:46 AM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Confused about what happens to the losing block when two miners compete.  (Read 82 times)
Aljawaab (OP)
Newbie
*
Offline

Activity: 8
Merit: 4


View Profile
October 26, 2026, 02:03:30 PM
Merited by BlackHatCoiner (4)
 #1

‎I'm still learning how Bitcoin works, and I've been reading the "Chain Reorganization" on Learn Me A Bitcoin guide.

https://learnmeabitcoin.com/technical/blockchain/chain-reorganization/


‎I understand that miners collect transaction into blacks, but I am confused about what happens when two miners find valid blocks almost the same time.
‎which block does the network eventually accept, and what happens to the transaction included only in the block that loses? Do those transactions disappear completely or return to Memory pool.
‎
‎I would appreciate an explanation of how this works in practice. Iam a newbie and I want to understand the process properly.

hosemary
Legendary
*
Offline

Activity: 3290
Merit: 7443



View Profile
October 26, 2026, 04:53:49 PM
Merited by BlackHatCoiner (4), philipma1957 (3), vapourminer (1)
 #2

‎which block does the network eventually accept, and what happens to the transaction included only in the block that loses? Do those transactions disappear completely or return to Memory pool.
We will have two chains, and the next block will determine which one wins.

Assume that we have chains A and B, and each has N blocks.
The chain that receives the block N+1 first will become the winning chain and the network will ignore the other chain.

Transactions that were included in the losing chain but not in the winning chain will be treated as unconfirmed transactions and can be included in any of the next blocks.

nc50lc
Legendary
*
Offline

Activity: 3304
Merit: 9312


Self-proclaimed Genius


View Profile
October 27, 2026, 04:28:13 AM
Merited by vapourminer (4), BlackHatCoiner (4)
 #3

-snip- and what happens to the transaction included only in the block that loses? Do those transactions disappear completely or return to Memory pool.
In case the node initially followed a stale block and accepted the active chain, the node will check which transactions are already confirmed to be removed from its mempool.
Then, the ones that aren't included to the active chain but was included to the stale block will be re-included to its mempool.
(take note that each node's mempool can be different)

‎I would appreciate an explanation of how this works in practice. Iam a newbie and I want to understand the process properly.
You'll love testnet4's blockchain for this.
Visualization of its forks: fork.observer/?network=testnet4 (you can zoom-in/out with your mouse wheel)

Imagine that the lines in that chart are the bitcoin nodes, some follow a fork and some follow the other
and once a block of the same height has more blocks on top of it, the other fork usually got stale.

Mainnet's blockchain isn't s chaotic as that, but it's a good example of what you're currently researching.

Aljawaab (OP)
Newbie
*
Offline

Activity: 8
Merit: 4


View Profile
October 27, 2026, 03:34:11 PM
 #4

So if I understand correctly;
 When a node switches to the longer chain, the transaction from the losing block go back into the memory pool if they are still valid and not confirmed. And conflicting transaction in the winning block is dropped.
‎thank you both, the tool really helped me.
‎
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!